memcache pool problem

Stan Kuhn sk at absite.com
Fri Aug 4 10:03:44 UTC 2006


Ou yes ;o)

I downloaded source code of memcache client and dived in. I figured out from
there that key, key length and servers probability setup are used to
calculate hash key to the server where information is stored. So I
understood that different config on each machine makes it impossible to
calculate same hash key so it never matched the right server...

I reconfigured memcache in the way it is supposed to be and it is working
well now..

So this maybe something to think about for later development of memcache. 
Something like data could be set locally and read in one of the servers in
the pool primarily (maybe one locally running) and then try to access
information if doesn't exist over network by hash key...

That would make it possible to write always locally (in configuration I do
have memcache server on each application server) and read locally primarily
then over network. So it would decrease traffic significantly. 
Won't be easy to implement alongside hash calculation though.

Stan.



-----Original Message-----
From: Brian Moon [mailto:brianm at dealnews.com] 
Sent: 04 August 2006 07:09
To: Stan Kuhn; memcached at lists.danga.com
Subject: Re: memcache pool problem

> Do I misunderstand all this stuff or is there anything wrong with my 
> configuration?

I think you do misunderstand.  memcached is not a redundant cache.  It is a
distributed cache.  A given key will only ever live on one machine, not on
all of them.  So, while probability may be higher that the local machine
will be queried, that only means that more keys will be stored there.  Oh,
and if you different configs on different machines, getting the same key on
the same machines is pure luck.  All clients need to have the same
configuration.

-- 

Brian Moon
-------------
http://dealnews.com/
Its good to be cheap =)



More information about the memcached mailing list