[docs] Please list the differences between cookie-session and express-session
mariusa opened this issue · comments
For example, express-session stores cookie session in memory, so it's lost on every server restart. cookie-session is preserved (is this true?)
Thanks
Express-session stores session data into configurable backends, ranging from memory to any number of databases, thus allowing essentially unlimited session storage.
cookie-session stores session data into cookies, thus being limited to a bit under 4k bytes of session storage.
Most of the rest of the differences are consequences of this decision:
- cookie-session works without depending on an external datastore (so less infrastructure to set up, configure, maintain)
- cookie-session works behind load balancers without 'sticky-sessions' having to be enabled/configured.
Thanks! Would be great to have this at
https://github.com/expressjs/cookie-session
as well (I would have found it useful)
That explanation sounds great! Please feel free to submit a pull request adding it to the README, otherwise I can add one soon :)