Distribution of data based on traffic
Jamie McCarthy
jamie at mccarthy.vg
Sun Dec 3 01:22:08 UTC 2006
erick.dennis at epublica.de (Erick Dennis) writes:
>> traffic on our servers is quite unevenly distributed, varying
>> anywhere from 2-3Mbps up to 30Mbps.
> 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.
That's not a bad hack but it still seems hacky to me. I've thought
for a while that clients should support an API that will optionally
write a key to all servers at once, and optionally read a key from
any server at random. No server code change would be required. If
an application didn't want to use this feature, no client code
change would be required either.
If I threw together a patch for Cache::Memcached to do this, would
anyone be interested?
--
Jamie McCarthy
http://mccarthy.vg/
jamie at mccarthy.vg
More information about the memcached
mailing list