A bit of confusion terminolgoy about TiKV
TiKV store
TiKV peer
peer: replica of Region
in tidb-scheduling.md #5929
Open
Description
- When a new
TiKV store
is added, data can be rebalanced to it; - The cluster can perform automatic disaster recovery from
TiKV peers
' failure. - Note that here "position" is different from "machine". Generally PD can only ensure that replicas of a Region are not at a same peer to avoid that the
peer
's failure causes more than one replicas to become lost. However in production, you might have the following requirements:
Region is the minimal piece of data storage in TiKV, each representing a range of data (96 MiB by default). Each Region has three replicas by default. A replica of a Region is called a peer
. Multiple peers of the same Region replicate data via the Raft consensus algorithm, so peers are also members of a Raft instance. TiKV uses Multi-Raft to manage data. That is, for each Region, there is a corresponding, isolated Raft group.