kubernetesredisredis-cluster

Block volume data replication in redis cluster running on OKE


We currently have a 3 node redis cluster running on OKE which has 3 Master nodes only( no replica nodes, each running on their own pod ) with no persistent storage . As an enhancement we are adding 3 replica nodes and Block volumes for persistent storage. We will have 6 pods ( one for each redis cluster node with 3 master and 3 replica nodes) each pod will have its own block volume.

Master1     ,  Master2   ,Master3      ,Replica1,   Replica2,   Replica3
BV1         ,  BV2       ,BV3           ,BV4         ,BV5        ,BV6

I wanted to know if Master pod goes down and Replica pod becomes the new Master then how does the data from Block volume of master will get replicated to Replica's block volume ? or do we only need to have 3 block volumes ( only for master nodes) so that when master node goes down and replica becomes the new master then it can start using Master pods block volume.


Solution

  • Not sure how you are setting up the cluster but if you using Helm chart or something it might be creating the statefulsets.

    Statefulsets will be having separate PVC unless you setup or plan to use shared Block storage (PVC).

    Each stateful set suppose 3 Node and 3 Salve total have 6 PVC and between those Redis bus will take care of replication.

    Unless you with using some NFS or shared volume option which in the background uses 2-3 Block volume that's a whole different case.

    With a normal cluster setup of Redis with Helm or Operator scenario will be something like the above.