How to maintain cache update on different memcached servers?
jeremy at belent.com
Tue Oct 31 15:54:48 UTC 2006
> consider this suitation:
> Machine A
> MySQL Master A
> Memcached A
> Machine B
> MySQL Slave B
> Memcached B
> Support a user query a object thru complex SQL join statement from
> MySQL slave B, this object is cached using Memcached B, in order to
> offload the MySQL slave B
Memcached A + B = Memcached pool C.
You read from slave B, then cached it in pool C.
Master A is updated, and deletes (or updates) the old entry in pool C.
Half the stuff you cache will be stored in memcached A and half in
If you need more cache space, you just add servers to the pool.
Think of your memcached pool as one great big hash/associative array
that you can
share among all your machines, and it will make more sense.
More information about the memcached