Block volume data replication in Redis cluster running on OKE.

huangapple go评论54阅读模式
英文:

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.
我们目前在OKE上运行着一个3节点的Redis集群,只有3个主节点(没有副本节点,每个节点都在自己的Pod上运行),没有持久性存储。作为改进,我们正在添加3个副本节点和块卷以实现持久性存储。

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.
我们将有6个Pod(每个Redis集群节点一个,包括3个主节点和3个副本节点),每个Pod都将有自己的块卷。

Master1 , Master2 ,Master3 ,Replica1, Replica2, Replica3
主节点1,主节点2,主节点3,副本节点1,副本节点2,副本节点3

BV1 , BV2 ,BV3 ,BV4 ,BV5 ,BV6
块卷1,块卷2,块卷3,块卷4,块卷5,块卷6

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 pod's block volume.
或者我们只需要拥有3个块卷(只针对主节点),这样当主节点宕机并且副本节点成为新的主节点时,它可以开始使用主节点的块卷。

英文:

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.

答案1

得分: 1

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.

英文:

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.

huangapple
  • 本文由 发表于 2023年5月10日 23:17:03
  • 转载请务必保留本文链接:https://go.coder-hub.com/76220134.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定