At any given moment, your client thinks key k exists on the server represented in the server list by n where n = hash(k)
99.9999% of the time this list doesn't change unless you're doing a really bad job of running your memcached servers or your network, so you don't need to worry too much about it. Plus you can only really get inconsistent results if the server your key hashes to goes down, the value changes, gets written to the new server and then the original server comes back offline. If you really do care about not getting inconsistent results, though, you should just turn off failover. On Tue, Sep 14, 2010 at 7:25 PM, Granit <[email protected]> wrote: > or is it, if a server disconnects which a client was working with, > this particular client simply couldn't work with any server at all and > would have to wait for reappearance? at which state it would simply > receive possibly stale data. > > On Sep 15, 12:22 am, Granit <[email protected]> wrote: > > Oh yeah, > > > > I think my question would be answered in the not yet written: > > > > > getting stale entries when a memcached server flaps in and out of the > cluster > > > > which is why I posted it here... > > > > many thanks in advance > > > > On Sep 15, 12:17 am, Granit <[email protected]> wrote: > > > > > Thank you for the quick reply, > > > I did read that> It is able to use the same hashing process to figure > out key "foo" is on server B. It then directly requests key "foo" and gets > back "barbaz". > > > > > So what happens when key "foo" exists on server A and B? I mean by > > > accident not deliberately. I am aware that duplications are not > > > supposed to happen. > > > > > On Sep 15, 12:09 am, Adam Lee <[email protected]> wrote: > > > > > > I think you need to read up a little bit on memcached's entire > strategy on > > > > this: > > > > > > > http://code.google.com/p/memcached/wiki/FAQ#Cluster_Architecture_Ques... > > > > > > On Tue, Sep 14, 2010 at 7:03 PM, Granit <[email protected]> wrote: > > > > > Suppose one of the memcached machines in a cluster looses > connection, > > > > > when asking for a key it is non existent on any other machine in > the > > > > > cluster so > > > > > the client decides to create a new one, now the disconnected > machine > > > > > is back. > > > > > Thus we have two machines with the same key, which key->value pair > > > > > would we get > > > > > when requesting this duplicated key? > > > > > > > - the one created the last? > > > > > - which ever server answers first? > > > > > > > thanks > > > > > Granit > > > > > > -- > > > > awl > > > > > -- awl
