Memcache v / s redis for persistent sessions?

I want to make constant sessions on the server, I use node.js with an expression, and for this I first read about connect-redis enter the link here and connect-mongo enter the description of the link here I read that redis is faster than mongo, so I decided use it, but now I also find a module called memcached to enter a description of the link here I do not know what will be better for my project, also mamcache stores data in memory or where if it is memory, then it should be the fastest.

0
memcached session express redis
source share
1 answer

If you have already configured Redis, I will stick with it, as it is very fast and easy to manage. MemCached and Redis are very similar when used for caching, but the key difference is that Redis can be installed to save to disk in the background, which means that if the server is running, the data in memory can be reloaded.

Personally, I did not use MongoDb to save the session in speed, but if I used MemCached, I would use it as a backup for the sessions. for example, Writing session data in MemCached and Mongo, but only reading from MemCached and using Mongo to recover is an error.

On the bottom line, I think your choice of using Redis is the best of what you described.

+1
source share

All Articles