0
votes

Currently my Spring boot application has one redis server.

Now that I want to make the redis server high available, which approach should I follow?

For example I would have master, slaves and sentinel set up where if my master goes down automatically new master got elect and application works normal. Does that approch is called replication with automatic failover?

On the other hand how does cluster differ from above mentioned (replication) set up. Does it also has the support of sentinel servers for automatic failover?

And in terms of data, I read, cluster split data among multiple nodes instead relication has the exact copy of data of master in all slaves. In that case splitting data in multiple nodes of a cluster, would lead to stale data situation if some nodes go down?

1

1 Answers

2
votes

If you have more data than RAM on a machine, use redis cluster to shard the data across machines. Redis cluster supports master-slave replication and failover itself and doesn't need sentinel. If you have failures with a node, it will keep working until the majority of master nodes fail.

I you have less data than RAM on a machine, setup a master/slave replication with sentinel in front to handle the failover.

https://redis.io/topics/cluster-tutorial