Any other uses of memcached?

Justin Matlock
Thu, 19 Feb 2004 15:21:02 -0500

I've used it for sharing temporary data between webservers. 

For example, should I need to flip the site into read-only mode, and write
update/insert/delete SQL down to a disklog instead of the database (mySQL
replication seems to screw up a lot, so I have to do this every now and
then), I set a key "SITE_READ_ONLY" to "1"; the separate webservers check
for this on every page load.  Since they're already querying memcached for
userdata, there's no real performance hit here.

It's a lot faster than doing a seek on a NFS-based file.

Granted, it's not the smartest thing to do, since that key could
theoretically disappear on its own... :)   I *was* using it for session
data, until Brad pointed out how stupid of an idea that was.  ;)


-----Original Message-----
[] On Behalf Of Jamie McCarthy
Sent: Thursday, February 19, 2004 2:53 PM
Subject: Any other uses of memcached?

I'm talking about memcached to my local LUG next week.  I wondered
if anyone had any ideas for less-than-obvious uses for it.

Its most obvious use is caching DB query results.

A second use that I can think of is storing data for large-scale
numerical processing, perhaps scientific modelling, where many CPUs
have to work together on gigabytes of data, and the results of the
number-crunching are small enough to be written to disk periodically
(so if the power goes out, the most you lose is a few hours' work).

Any other ideas?
  Jamie McCarthy