Dear list,

I have a memcached cluster with 20+ servers that I need to access both from 
php and clojure (java). The problem is that I can't figure out how to set 
the hashing and locator strategies consistently in php and java.

On the php side we use crc32+consistent hashing.

On the java side, I've tried both spymemcached and xmemcached. By trial and 
error I found that in both cases I can get values that were set with php, 
provided that I find a good combination of a hashing/locator algorithm 
("consistent", "php", "ketama", ...) *and* the order in which I specify 
servers.

For instance, with xmemcached, these might work:

(with-client (memcached "server02:11211 server04:11211 server03:11211" 
:hash :php)
  (get "d0b6e29b5b377ed11f84f73f50655a49"))

(with-client (memcached "server04:11211 server02:11211 server03:11211" 
:hash :standard)
  (get "d0b6e29b5b377ed11f84f73f50655a49"))

But these not:

(with-client (memcached "server02:11211 server04:11211 server03:11211" 
:hash :standard)
  (get "d0b6e29b5b377ed11f84f73f50655a49"))

(with-client (memcached "server04:11211 server02:11211 server03:11211" 
:hash :php)
  (get "d0b6e29b5b377ed11f84f73f50655a49"))

The problem is that I don't know how to determine the good 
combination/order of servers automatically. Since I am dealing with 20+ 
servers, trying all possibilities is not an option. Any ideas?

Thanks!
Joachim.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"memcached" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to