memcache pool problem

Stan Kuhn sk at absite.com
Wed Aug 2 14:29:14 UTC 2006


Hi Guys...
 
my memcache servers in the pool don't work like they should... More
precisely, it doesn't work like I do expect (so meybe there is a problem)
 
Got installed this:
php module PECL memcache 2.0.4
memcache daemon 1.1.12
 
got pool of 5 memcache servers running on 5 different machines connected on
the local network.
 
When I add servers to the pool I set probability that the server will be
chosen. This probability thing works pretty fine.
 
The problem is that if I set value under key at one request, one of the
servers is chosen by probability given and value is stored on that server
(lets say server 3).
On the next request to get the value of the key, if other server is chosen
(lets say server 1) it tries to get the value from server 1 and expectedly
it fails. It is not trying to get this value from other servers in the pool
though. Instead it just set the value under the key on the server 1.
 
I tried to remove local memcache server from the pool and it is behaving in
the same way over local network, so there is not physical problem to get
data over network.
 
The way I'm thinking of it is that I'll have 5 servers each running one
memcache server. My application will store and get data from pool of the 5
memcache servers to have it available for all users working on diferrent
machines. To decrease local network traffic, local memcache server on each
machine will be added to the pool with highest probability to be chosen.
Therefore all gets will query primarily local server to store or get data.
But this is the point where it is failing.. It just does it primarily with
local server but it ignores other servers in the pool...
 
So basically my configuration works like using on each machine only local
memcahce that is not effective at all...
 
All extended statistics are showing that servers are in the pool no failures
there and they get hitrate about 75%...
 
Do I misunderstand all this stuff or is there anything wrong with my
configuration?
 
 
 
Thanks guys.
Stan
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20060802/6f98b798/attachment.html


More information about the memcached mailing list