Re: Behavior of Memcached Client during Replication Process

2012-10-19 Thread Roberto Spadim
guy, why you don't study the source code?
you sent a lot of messages with the same querstion!
i will add your contact to spam with more messages like that
read the wiki, read the source, understand the app, and stop asking the
same message 100 times

2012/10/17 Kiran Kumar krn1...@gmail.com

 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 .





-- 
Roberto Spadim


Re: Behavior of Memcached Client during Replication Process

2012-10-18 Thread Henrik Schröder
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 .





Behavior of Memcached Client during Replication Process

2012-10-17 Thread Kiran Kumar
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 . 




Re: Behavior of Memcached Client during Replication Process

2012-10-17 Thread Les Mikesell
On Wed, Oct 17, 2012 at 11:24 AM, 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 ??


There should be options for how the client handles a server failure:
http://code.google.com/p/xmemcached/wiki/FailureMode_StandbyNode

Failure doesn't mean 'key doesn't exist', though, it means 'server
connection fails'.

-- 
   Les Mikesell
 lesmikes...@gmail.com


Re: Behavior of Memcached Client during Replication Process

2012-10-17 Thread Kiran Kumar
Les Mikesell , Thanks for the link , but unfortunately that is no where 
related to my question above .
anyway once again , What i was asking is that as there is some delay in 
Data Replication , will the Memcache Client checks server2  also  in case 
if it doesn't found in Server 1 .

And does adding *KetamaMemcachedSessionLocator * to the code will help in 
anyway ??

On Wednesday, 17 October 2012 23:57:19 UTC+5:30, LesMikesell wrote:

 On Wed, Oct 17, 2012 at 11:24 AM, Kiran Kumar krn...@gmail.comjavascript: 
 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 ?? 
  

 There should be options for how the client handles a server failure: 
 http://code.google.com/p/xmemcached/wiki/FailureMode_StandbyNode 

 Failure doesn't mean 'key doesn't exist', though, it means 'server 
 connection fails'. 

 -- 
Les Mikesell 
  lesmi...@gmail.com javascript: 



Re: Behavior of Memcached Client during Replication Process

2012-10-17 Thread Les Mikesell
On Wed, Oct 17, 2012 at 1:56 PM, Kiran Kumar krn1...@gmail.com wrote:
 Les Mikesell , Thanks for the link , but unfortunately that is no where
 related to my question above .
 anyway once again , What i was asking is that as there is some delay in Data
 Replication , will the Memcache Client checks server2  also  in case if it
 doesn't found in Server 1 .

No, I can't imagine any circumstance where a memcache client would
consider a key that doesn't exist in its expected location to be a
server error.  Why should it?I think the only way you can get that
effect is to define only one server.  All clients using the same
hashing should store/retrieve it on the same target as the first
choice anyway with the only reason to retry being if one is down - but
that leaves you without a good way to handle the situation where the
down instance is restarted and its cache is empty.

-- 
   Les Mikesell
 lesmikes...@gmail.com