You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some famous Redis service providers allow clients to directly connect to Redis instead of using Sentinel for finding Redis instances, for example, Scalegrid and DigitalOcean. On the other hand, the Spotahome Redis operator only supports Sentinel clients, because it doesn't create Kubernetes Service for the Redis itself.
If an organization decides to migrate from those to a Redis service operated by this operator, all clients must be changed to use Sentinel. This can add a heavy load to the migration and even possibly change the organization's mind.
proposed solution
We can add a single service that selects all Redis pods. But this might route write requests to Slave instances, resulting in data loss. Also, if we select only the Master instance, all requests (including the read requests) will be routed to the Master, resulting in poor resource utilization.
Since, at the time of routing using Kubernetes services, we can't determine whether a request is a write or a read one, in order to have better resource utilization, we might need to rely on the client to choose which type of instances it wants to send each request to. So, we need two services: one for the Master instance, and the other for all the Slave instances.
Since the role of each Redis pod is mentioned in its labels, we can simply use that label in the service pod selector.
The text was updated successfully, but these errors were encountered:
Feature Request: Master and Slave services
Some famous Redis service providers allow clients to directly connect to Redis instead of using Sentinel for finding Redis instances, for example, Scalegrid and DigitalOcean. On the other hand, the Spotahome Redis operator only supports Sentinel clients, because it doesn't create Kubernetes Service for the Redis itself.
If an organization decides to migrate from those to a Redis service operated by this operator, all clients must be changed to use Sentinel. This can add a heavy load to the migration and even possibly change the organization's mind.
proposed solution
We can add a single service that selects all Redis pods. But this might route
write
requests to Slave instances, resulting in data loss. Also, if we select only the Master instance, all requests (including theread
requests) will be routed to the Master, resulting in poor resource utilization.Since, at the time of routing using Kubernetes services, we can't determine whether a request is a
write
or aread
one, in order to have better resource utilization, we might need to rely on the client to choose which type of instances it wants to send each request to. So, we need two services: one for the Master instance, and the other for all the Slave instances.Since the role of each Redis pod is mentioned in its labels, we can simply use that label in the service pod selector.
The text was updated successfully, but these errors were encountered: