[Mongrel] Mongrel and MemcacheSessionStore

snacktime snacktime at gmail.com
Sun Feb 4 20:24:31 EST 2007


> The application in question was running fine in the production
> environment with SQLSessionStore and using a mongrel cluster behind a
> load balancer. However, by switching to a MemcacheSessionStore (using
> either memcache-client or Ruby-MemCache), users kept being logged out
> due to the fact that the processes lost their connection to the memcache
> server (they reconnected but the users were already "logged out").

Personally, I wouldn't ever use memcache without a persistent backing
store for sessions.    It works best when writes always hit memcache
and the backing store, and reads check memcache first then fall back
to the persistent store.  Assuming a normal scenario where you aren't
writing to the session store that often, then your cache hit rate will
still be pretty good and your site won't stop working if memcache
fails.


Chris


More information about the Mongrel-users mailing list