memcached + apache::session::memcached

Matthew Lenz matthew at nocturnal.org
Tue Mar 22 10:45:51 PST 2005


I'm curious if anyone has used memcached to implement a Java session
like session system with perl.  We have an application that due to some
mis-design requires a separate dbi::mysql connection per request (this
is in addition to the one connection it opens to communicate with the
db).  Also, due to deep nested structures we are automatically
incrementing a top level key => value so that the session is always
stored back to the db if it is opened.  None of this would be required
normally, but we are in a load balanced environment and have experienced
race conditions.  We have three machines that handle this application
and its entirely possible that one http application request from a
customer can arrive to a different machine than the previous request.

I'm looking for a solution similar to java's session (servlet/jsp) where
the given session and its data is migrated to and from different servers
automatically.  It almost seems like memcached +
apache::session::memcached was designed for this purpose but I'm not
sure if I'm on the right track.  Sorry if I missed some glaring
documentation but hopefully someone can off some advice.

Does memcached migrate its data between a cluster of servers?  I'm
looking for a simple drop in replacement where the local webserver runs
a memcached server which receives update/read session requests and then
migrates the data to the other webserver's memcache servers.


-Matt (memcache noob be gentle)



More information about the memcached mailing list