1
votes

I am using twemproxy for sharding. In nutcracker.yml file, I have placed all the masters. Then i made multiple slaves of these masters. I am using redis-sentinel to monitor all the masters. Redis-sentinel is doing perfectly well. When one of the masters goes down then its slave becomes the master. As twemproxy is not updated with new master, it is pinging to old master. Is there any way of updating master in nutcracker.yml file also. I am using Redis with Scala Play Framework.

2

2 Answers

3
votes

redis-twemproxy-agent - https://github.com/Stono/redis-twemproxy-agent could be possible solution.

From the README.md, it states:

A simple nodejs application which will connect to Redis-Sentinel and monitor for the master-change event. It will then update TwemProxy (nutcracker) and restart it.

The basic idea behind it, is so that you have redundancy in your redis shards, when your master dies, a slave is promoted to Master by Redis Sentinel, and then this agent updates your TwemProxy config to point to the new master.
0
votes

try redis-mgr (redis+twemproxy+sentinel deploy/auto-failover/monitor/migrate/rolling-upgrade):

https://github.com/idning/redis-mgr