I am working with two redis instances monitored by one sentinel.
when the master goes down and there is a "+sdown", I run a notification-script
where I promote the slave to master using the following command on its redis-client:
SLAVEOF NO ONE
.
It works fine.
My question is, it takes around 10 secs for the slave to become master and the application to continue working again.
How can i reduce this time stamp?
below is the sentinel config::::
sentinel monitor mymaster 127.0.0.1 6379 1
sentinel down-after-milliseconds mymaster 5000
sentinel failover-timeout mymaster 900000
sentinel can-failover mymaster yes
sentinel parallel-syncs mymaster 1
sentinel notification-script mymaster /etc/init.d/config/script.sh