Search code examples
redisdistributedhigh-availability

Should a number of Sentinels be odd?


There is a recommendation in the official Sentinel documentation:

You need at least three Sentinel instances for a robust deployment

That is totally understandable. But I think there's nothing said about evenness. Nevertheless, I always stumble upon comments that a robust HA Redis configuration demands an odd number of Sentinels placed on different machines higher than 2.

In the MongoDB manual, by comparison, there is a direct instruction to ensure an odd number of voting members.


Solution

  • NO, the number of sentinels DOES NOT need to be odd.

    The failover will be performed at least a majority of sentinels authorized. So if you have 4 sentinels, that's OK, but you need at least 3 sentinels to authorize the failover.