twitter / twemproxy

A fast, light-weight proxy for memcached and redis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hash and distribution algorithms get calculated incorrectly

kvelaro opened this issue · comments

Here is command we run

./src/nutcracker -c conf/nutcracker.trk.yml --verbose=8

Below is config mentioned above

primary-servers:
  listen: 127.0.0.1:22120
  hash: crc32
  distribution: modula
  timeout: 4000
  backlog: 1024
  preconnect: false
  server_retry_timeout: 2000
  server_failure_limit: 10
  servers:
   - 192.168.9.11:11211:1
   - 192.168.9.8:11211:1
  .... (19 servers more)

Options we use in direct connection from php libmemcached library

$memcached->setOption(\Memcached::OPT_HASH, \Memcached::HASH_CRC);
$memcached->setOption(\Memcached::OPT_SERVER_FAILURE_LIMIT, 10);
$memcached->setOption(\Memcached::OPT_COMPRESSION, false);

If we use proxy, data stored in wrong memcache instance, distribution and hash calculated wrong.
So any advice please, what`s wrong?

Version | 3.1.5
-- | --
libmemcached version | 1.0.18