4 ms·
From the OP: > I changed the app to use cookie-based sessions, so that session data is stored in signed cookies rather than in memcache. This way, the web app
by mjackson 13y ago
From the OP:
> I changed the app to use cookie-based sessions, so that session data is stored in signed cookies rather than in memcache. This way, the web app servers don't need to share any state (other than the database). Plus it's faster for end users because the app doesn't have to hit memcache for session data.
The switch to using cookies for storing session data instead of memcache has tradeoffs. Sure, you no longer need to ask memcache for the session data. But you are also shipping a significantly larger cookie back and forth on every request.
If you're storing a lot of data in your session, this could actually slow things down in the long run. [1]
[1]: http://yuiblog.com/blog/2007/03/01/performance-research-part-3/ http://yuiblog.com/blog/2007/03/01/performance-research-part...
- adrianh 13y agoDefinitely a great point. Fortunately my session cookies are teeny.