[Mongrel] Mongrel and MemcacheSessionStore

Joey Geiger jgeiger at gmail.com
Sun Feb 4 22:18:38 EST 2007

I like this idea, do you have an example or suggestions on how you
could implement it easily?

On 2/4/07, snacktime <snacktime at gmail.com> wrote:
> > 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
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users

More information about the Mongrel-users mailing list