No, you will have to configure two client instances and read the key from both servers in your application.
However, sometimes you will get a cache miss from one server and a cache hit from the other server. And you have no way of knowing if that happened because a value was written to one server, but the write didn't replicate yet, or if it was deleted from one server, and the delete didn't replicate yet. I'm still incredibly curious as to why your system writes data to both servers, you don't gain any performance whatsoever, you only create consistency problems for yourself, and you lock yourself into a setup where you can't utilize the linear scalability of memcached. /Henrik On Wed, Oct 17, 2012 at 6:24 PM, Kiran Kumar <krn1...@gmail.com> wrote: > Hi , > > We are using Memcache in a different/wrong way , that is Memcache as a > Complete Data Store itself . > > The setup of our Application is in such a way that , there are two > Memcache servers (Server1 and Server2 )where both of them acting as active > active (Master - Master ) each of them gets unique store of Data , and > finally repcached is applied on top of these severs for providing > replication . > > The Data is being replicated bethween these two servers and i observed > that there is a small delay regarding the two servers being in sync with > each other > > I am using Xmemcached 1.4 version as Memcache Client . > > I have these two questions with respect to the above set up of our > Application . > > 1*. Is the XMemcached Client Smart enough to read Key from Server2 , > incase it can't find that key in Sever 1 ( As i mentioned that there is > a small delay till both the servers are in synch with each other )* > > 2. * Incase i configure my Memcache client to use > KetamaMemcachedSessionLocator inside the code , will this be of any help > with respect to the above scenario ??* > > > Thank you very much . > > >