0

I came across this intersting database the other day, and have read some doc on its offical site, I have some questions regarding Raft Group in TiKV (here),

Suppose that we have a cluster which has like 100 nodes, and the replication factor is 3, does that mean we will end up with a lot of tiny Raft "bubbles", each of them contains only 3 members, and they do leader election and log replication inside the "buble".

Or, we only have one single fat Raft "buble" which contains 100 nodes?

Please help to shed some light here, thank you!

gfytd
  • 1,747
  • 2
  • 24
  • 47

2 Answers2

1

In this case it means that you have 33 shards ("bubbles") of 3 nodes each.

A replication factors of 3 is quite common in distributed systems. In my experience, databases use replication factors of 3 (in 3 different locations) as a sweet spot between durability and latency; 6 (in 3 locations) when they lean heavily towards durability; and 9 (in 3 locations) when they never-ever want to lose data. The 9-node databases are extremely stable (paxos/raft-based) and I have only seen them used as configuration for the 3-node and 6-node databases which can use a more performant protocol (though, raft is pretty performant, too).

Michael Deardeuff
  • 10,386
  • 5
  • 51
  • 74
1

a lot of tiny Raft "bubbles", each of them contains only 3 members,

The tiny Raft bubble in your context is a Raft group in TiKV, comprised of 3 replicas(by default). Data is auto-sharded in Regions in TiKV, each Region corresponding to a Raft group. To support large data volume, Multi-Raft is implemented. So you can perceive Multi-raft as tiny Raft "bubbles" that are distributed evenly across your nodes.

Check the image for Raft in TiKV here

we only have one single fat Raft "buble" which contains 100 nodes?

No, a Raft group does not contain nodes, they are contained in nodes.

For more details, see: What is Multi-raft in TiKV