Welcome! Log In Create A New Profile

Advanced

same key on both memcached servers

Posted by Shaulian 
Shaulian
same key on both memcached servers
June 30, 2010 06:04PM
Relating to Memcached FAQ (http://code.google.com/p/memcached/wiki/
FAQ#How_does_memcached_work?), it is clear that when you use more than
on server for memcache, each key exist only one time, and only on one
server.

We are using 2 servers for memcached and 3 servers for app.
Lately we noticed that when we request the same key from AppServ1, it
returns DIFFERENT value when requesting it from AppServ2.
We tried to delete the key from BackOffice in AppServ1, but it was
still exist on AppServ2.
All the above clearly points that the key exists on each server.

We're using .NET memcached client library (http://sourceforge.net/
projects/memcacheddotnet/).

Anyone experienced such a thing ?
Brian Moon
Re: same key on both memcached servers
June 30, 2010 06:04PM
Normal, default operation of a memcached client is to failover to the
next server when a connection fails. So it is possible to have one key
exist on more than one server. However, most clients have an option to
turn this feature off. In those cases, a failed connection would lead to
the source data being regenerated.


Brian.
--------
http://brian.moonspot.net/

On 6/20/10 10:22 AM, Shaulian wrote:
> Relating to Memcached FAQ (http://code.google.com/p/memcached/wiki/
> FAQ#How_does_memcached_work?), it is clear that when you use more than
> on server for memcache, each key exist only one time, and only on one
> server.
>
> We are using 2 servers for memcached and 3 servers for app.
> Lately we noticed that when we request the same key from AppServ1, it
> returns DIFFERENT value when requesting it from AppServ2.
> We tried to delete the key from BackOffice in AppServ1, but it was
> still exist on AppServ2.
> All the above clearly points that the key exists on each server.
>
> We're using .NET memcached client library (http://sourceforge.net/
> projects/memcacheddotnet/).
>
> Anyone experienced such a thing ?
dormando
Re: same key on both memcached servers
June 30, 2010 06:04PM
This smells like you're configuring your clients wrong... The client list
must be _exactly the same_ on every app server. Don't reorder them or put
"localhost" in there.

It's also possible that appserv2 can't reach one of the memcached daemons
as well, and is putting keys on the only available server.

On Sun, 20 Jun 2010, Shaulian wrote:

> Relating to Memcached FAQ (http://code.google.com/p/memcached/wiki/
> FAQ#How_does_memcached_work?), it is clear that when you use more than
> on server for memcache, each key exist only one time, and only on one
> server.
>
> We are using 2 servers for memcached and 3 servers for app.
> Lately we noticed that when we request the same key from AppServ1, it
> returns DIFFERENT value when requesting it from AppServ2.
> We tried to delete the key from BackOffice in AppServ1, but it was
> still exist on AppServ2.
> All the above clearly points that the key exists on each server.
>
> We're using .NET memcached client library (http://sourceforge.net/
> projects/memcacheddotnet/).
>
> Anyone experienced such a thing ?
>
Shaulian
Re: same key on both memcached servers
June 30, 2010 06:04PM
I checked the configuring of the clients, both order and not
containing any 'localhost'.
I'll check the connection between each server to the other.

On Jun 20, 11:34 pm, dormando <[email protected]> wrote:
> This smells like you're configuring your clients wrong... The client list
> must be _exactly the same_ on every app server. Don't reorder them or put
> "localhost" in there.
>
> It's also possible that appserv2 can't reach one of the memcached daemons
> as well, and is putting keys on the only available server.
>
> On Sun, 20 Jun 2010, Shaulian wrote:
> > Relating to Memcached FAQ (http://code.google.com/p/memcached/wiki/
> > FAQ#How_does_memcached_work?), it is clear that when you use more than
> > on server for memcache, each key exist only one time, and only on one
> > server.
>
> > We are using 2 servers for memcached and 3 servers for app.
> > Lately we noticed that when we request the same key from AppServ1, it
> > returns DIFFERENT value when requesting it from AppServ2.
> > We tried to delete the key from BackOffice in AppServ1, but it was
> > still exist on AppServ2.
> > All the above clearly points that the key exists on each server.
>
> > We're using .NET memcached client library (http://sourceforge.net/
> > projects/memcacheddotnet/).
>
> > Anyone experienced such a thing ?
Shaulian
Re: same key on both memcached servers
June 30, 2010 06:04PM
Hi,
Found the Failover option, so i can test it.

Currently, only one memcached server is online, so there is no
failover possible at all, and everything is going alright (The
memcached server is accessible from both AppServ1+2+3).

Before testing the failover property (set it to false),
I will shut the currently working memcached server, turn on the second
on, and see whats happen.
Maybe the second server isn't configured well.


On Jun 20, 7:22 pm, Brian Moon <[email protected]> wrote:
> Normal, default operation of a memcached client is to failover to the
> next server when a connection fails. So it is possible to have one key
> exist on more than one server. However, most clients have an option to
> turn this feature off. In those cases, a failed connection would lead to
> the source data being regenerated.
>
> Brian.
> --------http://brian.moonspot.net/
>
> On 6/20/10 10:22 AM, Shaulian wrote:
>
> > Relating to Memcached FAQ (http://code.google.com/p/memcached/wiki/
> > FAQ#How_does_memcached_work?), it is clear that when you use more than
> > on server for memcache, each key exist only one time, and only on one
> > server.
>
> > We are using 2 servers for memcached and 3 servers for app.
> > Lately we noticed that when we request the same key from AppServ1, it
> > returns DIFFERENT value when requesting it from AppServ2.
> > We tried to delete the key from BackOffice in AppServ1, but it was
> > still exist on AppServ2.
> > All the above clearly points that the key exists on each server.
>
> > We're using .NET memcached client library (http://sourceforge.net/
> > projects/memcacheddotnet/).
>
> > Anyone experienced such a thing ?
Brian Moon
Re: same key on both memcached servers
June 30, 2010 06:04PM
What memcached client are you using?


Brian.
--------
http://brian.moonspot.net/

On 6/24/10 12:48 AM, Shaulian wrote:
> Hi,
> Found the Failover option, so i can test it.
>
> Currently, only one memcached server is online, so there is no
> failover possible at all, and everything is going alright (The
> memcached server is accessible from both AppServ1+2+3).
>
> Before testing the failover property (set it to false),
> I will shut the currently working memcached server, turn on the second
> on, and see whats happen.
> Maybe the second server isn't configured well.
>
>
> On Jun 20, 7:22 pm, Brian Moon<[email protected]> wrote:
>> Normal, default operation of a memcached client is to failover to the
>> next server when a connection fails. So it is possible to have one key
>> exist on more than one server. However, most clients have an option to
>> turn this feature off. In those cases, a failed connection would lead to
>> the source data being regenerated.
>>
>> Brian.
>> --------http://brian.moonspot.net/
>>
>> On 6/20/10 10:22 AM, Shaulian wrote:
>>
>>> Relating to Memcached FAQ (http://code.google.com/p/memcached/wiki/
>>> FAQ#How_does_memcached_work?), it is clear that when you use more than
>>> on server for memcache, each key exist only one time, and only on one
>>> server.
>>
>>> We are using 2 servers for memcached and 3 servers for app.
>>> Lately we noticed that when we request the same key from AppServ1, it
>>> returns DIFFERENT value when requesting it from AppServ2.
>>> We tried to delete the key from BackOffice in AppServ1, but it was
>>> still exist on AppServ2.
>>> All the above clearly points that the key exists on each server.
>>
>>> We're using .NET memcached client library (http://sourceforge.net/
>>> projects/memcacheddotnet/).
>>
>>> Anyone experienced such a thing ?
Shaulian
Re: same key on both memcached servers
July 14, 2010 08:00AM
Sorry for the late response.

I'm using the memcacheddotnet_clientlib-1.1.5.

On Jun 24, 7:27 pm, Brian Moon <[email protected]> wrote:
> Whatmemcachedclient are you using?
>
> Brian.
> --------http://brian.moonspot.net/
>
> On 6/24/10 12:48 AM, Shaulian wrote:
>
> > Hi,
> > Found the Failover option, so i can test it.
>
> > Currently, only onememcachedserver is online, so there is no
> > failover possible at all, and everything is going alright (The
> >memcachedserver is accessible frombothAppServ1+2+3).
>
> > Before testing the failover property (set it to false),
> > I will shut the currently workingmemcachedserver, turn on the second
> > on, and see whats happen.
> > Maybe the second server isn't configured well.
>
> > On Jun 20, 7:22 pm, Brian Moon<[email protected]>  wrote:
> >> Normal, default operation of amemcachedclient is to failover to the
> >> next server when a connection fails. So it is possible to have onekey
> >> exist on more than one server. However, most clients have an option to
> >> turn this feature off. In those cases, a failed connection would lead to
> >> the source data being regenerated.
>
> >> Brian.
> >> --------http://brian.moonspot.net/
>
> >> On 6/20/10 10:22 AM, Shaulian wrote:
>
> >>> Relating toMemcachedFAQ (http://code.google.com/p/memcached/wiki/
> >>> FAQ#How_does_memcached_work?), it is clear that when you use more than
> >>> on server for memcache, eachkeyexist only one time, and only on one
> >>> server.
>
> >>> We are using 2serversformemcachedand 3serversfor app.
> >>> Lately we noticed that when we request thesamekeyfrom AppServ1, it
> >>> returns DIFFERENT value when requesting it from AppServ2.
> >>> We tried to delete thekeyfrom BackOffice in AppServ1, but it was
> >>> still exist on AppServ2.
> >>> All the above clearly points that thekeyexists on each server.
>
> >>> We're using .NETmemcachedclient library (http://sourceforge.net/
> >>> projects/memcacheddotnet/).
>
> >>> Anyone experienced such a thing ?
Henrik Schröder
Re: same key on both memcached servers
July 14, 2010 12:50PM
Try switching to a more actively developed client like BeITMemcached or
Enyim?

http://github.com/henrikschroder/beitmemcached


/Henrik

On Wed, Jul 14, 2010 at 07:57, Shaulian <[email protected]> wrote:

> Sorry for the late response.
>
> I'm using the memcacheddotnet_clientlib-1.1.5.
>
> On Jun 24, 7:27 pm, Brian Moon <[email protected]> wrote:
> > Whatmemcachedclient are you using?
> >
> > Brian.
> > --------http://brian.moonspot.net/
> >
> > On 6/24/10 12:48 AM, Shaulian wrote:
> >
> > > Hi,
> > > Found the Failover option, so i can test it.
> >
> > > Currently, only onememcachedserver is online, so there is no
> > > failover possible at all, and everything is going alright (The
> > >memcachedserver is accessible frombothAppServ1+2+3).
> >
> > > Before testing the failover property (set it to false),
> > > I will shut the currently workingmemcachedserver, turn on the second
> > > on, and see whats happen.
> > > Maybe the second server isn't configured well.
> >
> > > On Jun 20, 7:22 pm, Brian Moon<[email protected]> wrote:
> > >> Normal, default operation of amemcachedclient is to failover to the
> > >> next server when a connection fails. So it is possible to have onekey
> > >> exist on more than one server. However, most clients have an option to
> > >> turn this feature off. In those cases, a failed connection would lead
> to
> > >> the source data being regenerated.
> >
> > >> Brian.
> > >> --------http://brian.moonspot.net/
> >
> > >> On 6/20/10 10:22 AM, Shaulian wrote:
> >
> > >>> Relating toMemcachedFAQ (http://code.google.com/p/memcached/wiki/
> > >>> FAQ#How_does_memcached_work?), it is clear that when you use more
> than
> > >>> on server for memcache, eachkeyexist only one time, and only on one
> > >>> server.
> >
> > >>> We are using 2serversformemcachedand 3serversfor app.
> > >>> Lately we noticed that when we request thesamekeyfrom AppServ1, it
> > >>> returns DIFFERENT value when requesting it from AppServ2.
> > >>> We tried to delete thekeyfrom BackOffice in AppServ1, but it was
> > >>> still exist on AppServ2.
> > >>> All the above clearly points that thekeyexists on each server.
> >
> > >>> We're using .NETmemcachedclient library (http://sourceforge.net/
> > >>> projects/memcacheddotnet/).
> >
> > >>> Anyone experienced such a thing ?
>
Sorry, only registered users may post in this forum.

Click here to login