Reputation: 63
We are exploring memcached for server-side caching.
If we setup a cluster of memcached nodes, as I understand from online resources, it looks like a given key will be present in only one of the available nodes. This essentially means that if that particular memcached node goes down, all the cache present on that node, at that point in time, is lost.
Is there any way the cache can be distributed across more than one memcached server nodes, so that we don't have a single point of failure?
Upvotes: 1
Views: 724
Reputation: 63
We got around this issue by grouping memcache servers into logical clusters within our client (2 or 3). While performing a cache "put", we put into all the clusters (which would save it on a single node within the logical cluster). However while performing a "get", we perform a get from subsequent cluster, only if the previous one fails.
With this setup, a memcache server does not act as a single point of failure and if a random memcache server does go down, we can always find the cache from another logical cluster
Probably not the best approach to solve this, but if there is any other better approach, please let me know.
Upvotes: 1