I run 3 redis-server instances on my server, The instances have different config files and db files. e.g: redis1 set the db location as /var/lib/redis_1, and the redis2 set the db location as /var/lib/redis_2. I have the twemproxy config:
alpha: listen: 0.0.0.0:9999 redis: true hash: fnv1a_64 distribution: ketama auto_eject_hosts: true server_retry_timeout: 2000 server_failure_limit: 2 servers: - 127.0.0.1:6381:1 - 127.0.0.1:6382:1 - 127.0.0.1:6383:1
I started the 3 redis instances, and set a data "name" as different values with redis-cli separately. e.g: I set the name as "6381" to the first server, and "6382" to the second one. I open the db files dump.rdb, and saw the 3 data values, then started twemproxy.
When I connect the twemproxy with redis-cli, and read the key "name", it always returns "6382". If I use different client to connect to it, the values are still the same. if I change the values directly in the Redis instabces, or do any other operations to twemproxy instance, I found the changes only updated to the second db file /var/lib/redis_2/dump.rdb.
Why doesn't twemproxy work with 3 redis-server instances? Is there any thing wrong with my config?