atom feed5 messages in ru.sysoev.nginxMemcached modules behaviour
FromSent OnAttachments
Pedro Mata-Mouros FonsecaNov 9, 2009 10:22 am 
agentzhNov 11, 2009 5:51 pm 
Pedro Mata-Mouros FonsecaNov 12, 2009 3:13 am 
agentzhNov 16, 2009 7:45 pm 
dennis caoNov 16, 2009 9:05 pm 
Subject:Memcached modules behaviour
From:Pedro Mata-Mouros Fonseca (pedr@sapo.pt)
Date:Nov 9, 2009 10:22:43 am
List:ru.sysoev.nginx

Greetings,

I have a pool of two memcached servers that I use in nginx for querying (using Valery's eval module) and, in case of cache miss, for setting with the key/value pair in a PHP script. How does nginx/eval module query this memcached pool? Any kind of hashing is done? Round- robin? While we're at it, does eval module reuse the default nginx memcache module implementation?

The original problem is that I'm having memcached key/value sets in PHP being done to a specific server (some key hashing algorithm is used with the PECL memcache extension), while later on nginx appears to be querying both servers (causing a cache miss when contacting the wrong server).

Any suggestions on how to solve this? Right now, the options I'm seeing are: 1. extend either nginx or PECL's memcache (or memcached) 2. use only one server for memcached 3. have my PHP do a set for every server in the pool

#2 is of course the easiest, not necessarily the safer. Thanks in advance.

Pedro.