You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
TwemProxy
__________|__________
| |
Master1 Master N
Slave1 SlaveN Slave 1 Slave N
Redis Sentinel
Your master names in Redis-Sentinel (sentinel.conf) should match the names of the master nodes in your twemproxy config.
I have included examples of sentinel and twemproxy configs in the conf directory
- Full yaml parsing of the config file rather than string replacements
- Full logging to a specific log file in cli.js
- Automatic complete master update upon connection to Redis-Sentinel
- An example init.d script, using forever, to run on boot. Albeit it currently runs as root, haven't got round to securing this yet.
About
nodejs Redis Agent which updates TwemProxy (nutcracker) config