NodeJS - Framework for stateless sessions?

Is there a framework to support fully client-managed sessions? In other words, instead of storing just the signed pid in the cookie (as Express does), store all context... so that you can manage state across clusters without the requirement to persist.

It appears Express now supports this:

http://expressjs.com/api.html#cookieSession

cookieSession()

Provides cookie-based sessions, and populates req.session. This middleware takes the following options:

  • key - cookie name defaulting to connect.sess
  • secret - prevents cookie tampering
  • cookie - session cookie settings, defaulting to { path: '/', httpOnly: true, maxAge: null }
  • proxy trust the reverse proxy when setting secure cookies (via "x-forwarded-proto")

Middleware:

app.use(express.cookieSession());

To clear a cookie simply assign the session to null before responding:

req.session = null