Memcached has an algorithm that choose the server based on the key input.
But it supposes you buy new servers, connect them to your network. And if you need to increase your cache to, let's say 1 Gb, you need to buy a new server ! This caching solution look expensive to me and do not compete with a local cache. It is true that accessing data in the RAM is much faster than accessing data on a local storage, but there is the overhead of the TCP connections.. ...
On his blog Artur Ejmond compares APC (Which is a local cache solution) and memcached. The result is clear APC is much faster and much cheaper.
Then why using memcached instead of a local cache solution ?
I can see two reasons :
- You have more than one client for the cache and you want all of them to share the same cache
- Theres's a lot of write on the cache and your disk risk to bottleneck
I know that many major sites like wikipedia or twitter use memcached, but I would be happy to hear why you choose memcached over a local cache solution.
Aucun commentaire:
Enregistrer un commentaire