0

We have a Redis Sentinel setup with 1 master, 2 replicas, 3 Sentinels. And we are planning to use it as a common in-memory storage solution for all the micro-services.

However, one of the micro-service is going to maintain a high priority data, which needs a dedicated slice of memory i.e 200 MB out of total memory available. To put it in another word, we don't want other service's cache to take over the available memory in worst case scenario.

It looks like there is no readily available solution in Redis.

Probable solution we have in mind is, to have a separate Redis Sentinel setup dedicated for the high priority data. However, this increases the cost, and maintenance overhead.

My question is, Is there a way we can achieve this requirement with a single Redis Sentinel setup ?

1 Answers1

1

If you want to isolate the high priority data, you have to set a dedicated Redis master with replicas. However, sentinels can be shared, i.e. the sentinel cluster can monitor multiple master-replicas setups.

In your case, you need to setup 2 masters each has 2 replicas, and 3 sentinels.

for_stack
  • 21,012
  • 4
  • 35
  • 48
  • Thank you. Currently, we have the sentinel instances running as another container alongside the Redis containers in each pods. So, with the approach you are proposing, we need to run the sentinels as separate pods right? – Karthikaiselvan R Oct 09 '22 at 08:39
  • Sorry, but I'm not familiar with k8s. However, you should ensure that if one node/host is down, there're still at least 2 sentinels and 1 replica are alive, so that a new master can be elected. Check [this](https://redis.io/docs/manual/sentinel/) for how to deploy sentinels. – for_stack Oct 10 '22 at 02:27