Replies: 1 comment
-
In a Redis deployment with Sentinels, a client should listen for both +switch-master and +reset-master messages to trigger a connection pool refresh. The +switch-master message indicates that a new master has been elected, while the +reset-master message indicates that the current master has been reset, possibly due to a failover. Failing to listen for the +reset-master message could result in the client continuing to use a connection to the old (now demoted) master, which could lead to data inconsistencies. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am currently using Jedis to connect to my Redis deployment. My setup has 3 Sentinels and 3 masters.
I can see the client is only listening to a +switch-master message to trigger a connection pool refresh whenever a new master is elected.
Is this implementation correct or should the client listen to other messages, for example
+reset-master
?I have already raised the question to the Jedis maintaner who suggested to ask here.
Beta Was this translation helpful? Give feedback.
All reactions