Best Session Storage Middleware for Express + MongoDB


I was looking for the best middleware for storing session data in MongoDB to use in a production application that uses express?

I've been looking around and found this:

  1. session-mongoose ( According to author's comment this is not production-ready for following reasons:

    • insufficient testing
    • zero optimization
    • there are better options than MongoDB for session storage
  2. connect-mongo (

  3. express-session-mongo (

    Based on these classes

    • Sencha Connect Memory Store
    • ciaranj's express-session-mongodb
  4. connect-session-mongo (

I've been looking at their code, I was trying to find also a performance comparisson article. Do you guys have experience to suggest which is the best?

12/27/2012 5:59:39 PM

Accepted Answer

connect-mongo ( looks better then others.

express-session-mongo and connect-session-mongo are very old and based on old version of mongodb driver.

session-mongoose based on mongoose, that slower than mongodb driver.

I think connect-mongo is the best choose.

12/27/2012 7:41:24 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow