Distribution of data based on traffic

Erick Dennis erick.dennis at epublica.de
Sat Dec 2 10:43:43 UTC 2006


Darryl Kuhn wrote:

 > It's a thought at any rate - has anyone else dealt with this kind of 
issue?

We're running a site that takes a about 3000 memcache requests/sec and 
is doing just fine.  Our strategy for data that we know is going to be 
heavily hit is to parameterize the key with a value unique to the client 
that will be asking for it.  For example, we know the number of users 
currently online is a key that's going to be hit every request from all 
of our application servers.  Instead of having a key like 
"users_online", app server #1 caches the data under "users_online.1", 
app server #2 caches the data under the key "users_online.2", etc.  You 
could also use a small md5 of the hostname or anything else.  This 
distributes the load very well if you're running more than just a 
handfull of servers.

Erick


More information about the memcached mailing list