What happens when a memcached server is down and the next fetch from cache misses?

53 views
Skip to first unread message

Gerard Ottaviano

unread,
Dec 4, 2014, 11:52:25 AM12/4/14
to memc...@googlegroups.com
Hi, new to memcached.  When a memcached server (#1) goes down and a subsequent fetch from cache to that server (#1) results in a miss and that results in a fetch to the backend, does that now create a new cache entry on one of the other memcached servers (#2) that is still available?  If so, when the down server (#1) becomes available again, and the next fetch of that same entry from the cache is requested, how does it determine from which server to get it, now that it exists on 2 servers?  Do we need to save the hashes which contain the server on which that cached entry exists, so we get the most recent one?  Thanks.

Ryan McElroy

unread,
Dec 4, 2014, 1:43:41 PM12/4/14
to memc...@googlegroups.com
All the logic you're describing is up to the client implementation; the servers just respond to requests they receive.

Some clients might failover a get to another memcached server; others might return an error.

Clients like mcrouter have configurable options on how to behave. Probably many other clients are configurable as well.

~Ryan (mobile)

On Dec 4, 2014, at 8:52 AM, Gerard Ottaviano <gjo...@comcast.net> wrote:

Hi, new to memcached.  When a memcached server (#1) goes down and a subsequent fetch from cache to that server (#1) results in a miss and that results in a fetch to the backend, does that now create a new cache entry on one of the other memcached servers (#2) that is still available?  If so, when the down server (#1) becomes available again, and the next fetch of that same entry from the cache is requested, how does it determine from which server to get it, now that it exists on 2 servers?  Do we need to save the hashes which contain the server on which that cached entry exists, so we get the most recent one?  Thanks.

--

---
You received this message because you are subscribed to the Google Groups "memcached" group.
To unsubscribe from this group and stop receiving emails from it, send an email to memcached+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages