pingcap / pingcap/tidb

Optimization and Encapsulation of TiDB etcd Usage

Open
#59,371 1 comment 0 reactions 0 assignees View on GitHub
type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement

To optimize TiDB's usage of etcd and reduce pressure on PD etcd, we propose the following changes:

1. Encapsulate the usage of TiDB etcd. TiDB will no longer directly use the etcd API, but will access etcd through an encapsulated interface and the interface's etcd. We can enhance the interface with additional management and monitoring capabilities for etcd.
2. Support different addresses for TiDB etcd and PD etcd.
3. Different TiDB etcd cluster can be used for different keyspaces, introduce `keyspace meta service group` concept.
4. Consider using etcd only when necessary; if there are alternative implementation methods, do not use etcd to reduce the pressure on it.

Other considerations:
1. It may be necessary to place a keyspace different etcd keys on TiDB in different etcd instances to isolate high-frequency operations.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.