pingcap / pingcap/tidb-operator
[Feature] Auto Scaling for TiDB/TiKV in TiDB Operator
Open
@King-Dylan is already working on this.
Since Dec 23, 2025.
cloud/aws
enhancement
- Dominant language
- Go
- Stars
- 1.3k
- Forks
- 540
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 18
Description
Description
Scaling TiDB/TiKV today requires manually updating TidbCluster.spec.replicas. This issue proposes an optional auto-scaling controller that periodically reads metrics (e.g. Prometheus) and automatically adjusts replicas via TiDB Operator.
MVP Requirements
- Triggers: CPU / memory (TiDB); + storage (TiKV)
- Guards: threshold + sustained duration, cool-down
- Safety:
min/max/stepreplica limits, multi-AZ balance, scale-in maintenance window - Failure handling: retry + timeout, optional rollback, clear events/logs
Phases
- Phase 1: TiDB auto scaling
- Phase 2: TiKV auto scaling (adds storage + data balancing considerations)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.