bad for sessions?
Josh Berkus
josh at agliodbs.com
Fri Feb 11 11:57:13 PST 2005
Perrin, Tom:
> Because it is a cache, not a database. It keeps the data in memory and
> makes no effort at durability. If a memcached server goes down, all the
> data is simply lost. There is failover in terms of operation, but it
> does not save any of the data.
Actually, I find memcached very useful for session maintenance. Here's the
scenario:
I have an intranet where access is very tightly controlled. As a result,
every single time a user loads a page or operates a control that requires
data access, their session information is updated and checked against their
last session info; if they change IP addresses, for example, or go over 30
min idle time, they get kicked off.
User session info is stored in two places: in a database table, and in
memcached. The database table gets updated only when the user logs on and
when the user logs off (or gets kicked off). All updates on page loads, etc,
get updated in memcached.
If the server goes down, I don't care whether I lose the information on who
reloaded a page 60 seconds before the server went off.
--
--Josh
Josh Berkus
Aglio Database Solutions
San Francisco
More information about the memcached
mailing list