I'm trying to answer according to your scenario: 1. "foo" will not be stored in any other node until your app will specifically write it to one of your available nodes. The standard memcached isn't a fail-safe platform 2. To avoid your app from trying to write to a failed node, you should delete the failed node from the servers list in all your clients. You can of course wait until the failed node restart and avoid that process, but be aware that after the restart process of a memcached node all the previously stored keys are flushed 3. And like all the other guys told you, no persistence storage available for memcached currently.
IMO - the best place to understand how memcached works is here<http://code.google.com/p/memcached/wiki/NewStart> On Fri, Sep 21, 2012 at 1:03 AM, [email protected] < [email protected]> wrote: > for your first question, foo will not be cached since you only GET it. > > second, some client, such as libmemchaed, implements kick-retry mechanism. > it will remove the dead node and retry it in every timeout interval. in > addition, you may want to use replica to mimic a master-slave backup. > > lastly, memocached stores in memory only. i extend the storage to disk for > myself use, so we can cache much more items. recently added items will > stores in memory and old ones moves to disk storage. > > 发送自HTC手机 > > ----- Reply message ----- > 发件人: "Anurag Kapur" <[email protected]> > 收件人: <[email protected]> > 主题: memcahced cluster config. newbie question > 日期: 周四, 9 月 20 日, 2012 年 9:36 下午 > > > Hi, > > I have just been reading the wiki to understand how memcached works. I > have understood how to use it but have a question around the cluster > configuration. Say key "foo" was stored on node A which has now gone down. > A client requests for "foo", its not there on any node in the cluster and > this is a cache miss. At this point would "foo" get cached again on a node > that is still available in the cluster or will "foo" keep returning cache > misses until node A comes back up? > > Additionally, if the cluster indeed waits for node A to come back up, how > is removal of nodes from a cluster configuration handled? > > I am keen to understand these internal workings of memcached so any > pointers to existing documentation or an explanation would be much > appreciated. Also, is there any documentation explaining how the hashing > and key resolution work? How does the key resolution to map to a key to a > specific memcached node? I think it happens in the client itself. Correct? > > Lastly, is memcached purely in-memory or can it write to disk as well? > > Thanks in advance. > > Anurag > -- Yiftach Shoolman +972-54-7634621
