Skip to content

Design and infrastructure

Andrei Dobre edited this page Feb 26, 2021 · 33 revisions

Design and infrastructure

The Redis operator currently supports the management of a Redis-cluster database, replication only. The minimal working setup that can be created and managed is made of 6 nodes

RedisCluster custom resource

The RedisCluster CR is similar to a StatefulSet - it describes the layout of the Redis cluster in terms of leader and replica node count.

Redis update

The operator supports rolling updates. A rolling restart is applyed to each leader-follower group one my one, always in ascending order of the leader-number.

The following steps are done by the RedisCluster controller during an update, sequentially for each leader:

  1. Recreate the follower pods of a leader using the new Redis image
  2. Wait until data sync between followers and leader is complete
  3. Update the leader
    1. Do a FAILOVER operation on one of the followers so it is promoted as new leader
    2. Recreate the leader pod and add it as a follower of the node promoted during the previous step
    3. Wait for data sync
    4. Do a FAILOVER operation on the updated leader

MaxSurge and MaxUnavailable options are currently not supported.

Limitations

  1. The operator uniquely identifies all Redis nodes by their IP addresses. This introduces the following limitations:

    1. All pods must run on the same network and have different IPs.
    2. Only one Redis instance can run on a pod.
  2. Only one custom resource managed per namespace. Each Redis cluster will need its own operator deployment and unique select label for the pods.

  3. No cross-namespace support, the RedisCluster and operator deployment should be in the same namespace.

Clone this wiki locally