Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 三机房实例数量不对等情况下的region调度策略的疑问

[TiDB Usage Environment] Production Environment
[TiDB Version] 6.5.0, 5.4.3
[Reproduction Path]
[Encountered Problem: Problem Phenomenon and Impact] There is a scenario with three geographically dispersed data centers, and these three data centers jointly form a TiDB cluster. However, the number of servers in these three data centers is not consistent. They are: 3, 4, and 5 respectively.
Labels were assigned to the data centers, and a strategy was set to enforce isolation by data center.
But I found that abnormal Region scheduling occurs periodically. I did some statistics, and the approximate scheduling situation is as shown in the figure:
The three data centers have internal scheduling at fixed times, lasting about two days.
Could it be due to this logic:
Detecting an imbalance in the number of Regions on TiKV — Initiating balance — Finding that only machines within the same data center are allowed to schedule — After scheduling, it is still imbalanced — Continuing to balance.
This leads to a balance loop.
[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]