You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I see from the docs that the regular MemoryStore that express-session writes to is not practical for use in a production environment.
I would still like to be able to store the sessions in RAM and I have seen mentions about other more stable memory stores such as redis (im not sure this is a memory type store?) and memcache.
I'd like to avoid using a store such as mongoDB to reduce the overhead of setup and maintenance on the production server. Plus the team I am working in does not have any real noSQL db experience, so I want to simplify using express-session within our application as much as possible.
Can anyone provide me some advice on why we really ought to be using a non memory based stored, or can a memory store still provide decent functionality out of the box (cleanup sessions, setting expiry, etc)
The text was updated successfully, but these errors were encountered:
Hi! The # 1 problem with using an in-memory store is you can never scale your application, not even using cluster. This is because if requests are load balanced, then you will keep getting lookup misses. The other reason is just one server crash and all your sessions are lost, as there is no persistence. For example, your server has a slight programming error, it crashing, your running restarts it, but now every user is logged out of your web site.
As for the MemoryStore that is part of this module, it's specifically designed for debugging purposes, which is why the sessions don't expire, etc. so you can use a debugging tool to examine the contents at any time.
A good store module can overcome these things, but I'm not aware of one someone has made. I hope this helps!
So I see from the docs that the regular MemoryStore that express-session writes to is not practical for use in a production environment.
I would still like to be able to store the sessions in RAM and I have seen mentions about other more stable memory stores such as redis (im not sure this is a memory type store?) and memcache.
I'd like to avoid using a store such as mongoDB to reduce the overhead of setup and maintenance on the production server. Plus the team I am working in does not have any real noSQL db experience, so I want to simplify using express-session within our application as much as possible.
Can anyone provide me some advice on why we really ought to be using a non memory based stored, or can a memory store still provide decent functionality out of the box (cleanup sessions, setting expiry, etc)
The text was updated successfully, but these errors were encountered: