What is replica-schedule scheduling, and how is it different from region-schedule?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 什么叫replica-schedule调度,和region-schedule有什么区别?

| username: 江湖故人

PD Configuration File Description | PingCAP Documentation Center

| username: TiDBer_jYQINSnf | Original post link

The main task of replica-schedule is to ensure that the number of replicas equals the set number of replicas, for example, 3.
To add a note: this mainly handles situations like adding a peer when one goes down, or deleting an extra peer if there are too many.
Region-schedule is mainly responsible for the distribution of region peers.
This involves ensuring that the peer distribution meets label requirements and determining which TiKV to place them on, among other things.

| username: 江湖故人 | Original post link

If one out of three stores fails, is the operator that replicates the follower to the remaining two stores considered a replica?

| username: TiDBer_jYQINSnf | Original post link

If one out of three stores fails, nothing can be done, and it should be impossible to replenish the replica. When a store is down, the fix-peer function is called, which will select a store. If one out of three fails, the remaining two both have replicas, so no store can be selected, and the add-peer operator cannot be generated.

| username: Kongdom | Original post link

:thinking: It should be taken literally, one is a replica, and the other is a storage unit.

| username: 小龙虾爱大龙虾 | Original post link

Limit the speed of scheduling generated by ReplicaChecker and RuleChecker.

| username: 江湖故人 | Original post link

Still a bit confused :face_in_clouds:
Manually scheduling Region 1 to store 2, 3, 4 like this belongs to region-schedule, right?
operator add transfer-region 1 2 3 4

| username: 考试没答案 | Original post link

The image is not available for translation. Please provide the text content directly.

| username: 考试没答案 | Original post link

One affects the speed of TiKV offline, and the other affects the speed of region balancing. Regions generally have 3 replicas.

| username: TiDBer_jYQINSnf | Original post link

The region-schedule-limit restricts the number of operators generated during balance-region. Another impact is the speed of replica replenishment.

| username: MrSylar | Original post link

The default value of tidb_enable_clustered_index is INT_ONLY, which means that only integer primary keys will use clustered indexes.

| username: redgame | Original post link

replica-schedule: Replica distribution, region-schedule: Region distribution

| username: dba远航 | Original post link

replica-schedule: Replica scheduling, region-schedule: Region scheduling

| username: 哈喽沃德 | Original post link

  1. Replica Schedule:
  • The Replica Schedule is responsible for managing the distribution of replicas in TiKV. In a TiDB cluster, data is divided into multiple Regions, each containing multiple replicas. The goal of the Replica Schedule mechanism is to ensure that each replica of a Region is distributed across different TiKV instances, thereby improving data reliability and availability.
  • The Replica Schedule monitors the load of the TiKV cluster and dynamically adjusts the distribution of replicas based on the load to avoid data skew and single points of failure.
  1. Region Schedule:
  • The Region Schedule is responsible for managing the distribution and load balancing of Regions in TiKV. A Region is the smallest unit of data storage in TiKV, and each Region stores data within a certain range. The goal of the Region Schedule is to ensure that the number of Regions on each TiKV node in the cluster is balanced, avoiding overloading certain nodes or data skew.
  • The Region Schedule dynamically migrates Regions based on the load and data distribution of each TiKV node to achieve load balancing and data balancing.
| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.