Memcached as a Sessions Store (etc)

timeless time at
Wed Jun 28 21:04:38 UTC 2006

Brian Moon wrote:

> So, before you were hitting the db every time for sessions?


> We use memcached to cache the sessions that are kept in the db.  So, 
> only once per day or on a change to that users session is the data in 
> memcached destroyed.

Sure. MySQL was plenty capable of keeping up with the inserts and 
selects done to deal with sessions. Our problem was actually with 
clearing out old sessions. The script to delete old sessions, despite 
being fairly sophisticated in its attempts to not overload the sessions 
database, still affected it.

We surmise that Memcached will remove expired sessions with less 
overhead than MySQL.


More information about the memcached mailing list