Memcached "cluster"
Brad Fitzpatrick
brad at danga.com
Wed Dec 21 18:33:06 UTC 2005
On Wed, 21 Dec 2005, Kevin Pratt wrote:
> Just looking for some clarification.
>
> It is up to the application to distribute the keys across a memcached "cluster"
No, it's up to the memcached client library. Your application is
blissfully unaware of the details.
Memcached can be thought of as a two-layer hash. The client library does
the first one (to pick the memcached instance), and the memcached instance
itself has a hash table internally.
> memcached instances do not pass information between each other.
Correct.
> Please correct me if I am wrong.
Only wrong in that application code doesn't need to do it.
> So an example of how memcached could be used would be setting up one instance
> per web server and each web server uses its own memcached instance.
That's a bad idea. Waste of memory having redundant cache. And when your
app invalidates something in the database, you'd have to wipe it from 'n'
different instances.
> I was wondering if there was a way to have all the memcached instances act as
> one? So a key stored in one instance is available to all instances.
That's unnecessary --- just store it in one. Let the client library
handle it.
- Brad
More information about the memcached
mailing list