Support traffic replay
@djshow832 y travaille déjà.
Depuis le 26/8/2024.
Évaluation
Cette issue n'a pas encore été évaluée.
Description
Feature Request
Describe your feature request related problem
There are some cases when users want to capture the traffic on the production cluster and replay the traffic on a testing cluster:
- A new TiDB version may have compatibility breakers, such as the statements failing, running slower, or resulting in different query results.
- When the cluster runs unexpectedly, users want to capture the traffic so that they can investigate it later by replaying the traffic.
- Test the maximum throughput of a scaled-up or scaled-down cluster using the real workload instead of Sysbench or TPCC.
Some traffic replay tools are widely used, including tcpcopy, mysql-replay, and query-playback. Tcpcopy and mysql-replay capture data like tcpdump, while query-playback is based on slow logs. Although some of them are built for MySQL, deploying them on the proxy instance also works.
However, they have some limitations:
- Users need to learn the deployment and usage of these tools.
- Tcpcopy only captures new connections, which is unfriendly for persistent connections. Mysql-replay can capture existing connections but it loses session states such as prepared statements and session variables, which may make replay fail.
- The tools replay the traffic with one username and one current schema, which requires modification to the testing cluster.
- Tcpcopy and mysql-replay don't support TLS because they can't decode the encrypted data.
- Users need to verify the results and performance manually.
Describe the feature you'd like
Capturing traffic on one TiDB cluster and replaying the traffic on a new TiDB cluster to verify the SQL compatibility and performance of the new TiDB cluster.
Tasks
Design
- #643
Traffic Capture
P1:
- #645
- #647
- #674
- #676
- #672
- #681
P2:
- #726
- #717
- #719
- #729
- #722
P3:
- Support more command types
Traffic Replay
P1:
- #652
- #654
- #657
- #659
- #678
- #687
- #700
P2:
- #711
P3:
- Streaming reading and sending large commands
- Track and limit the memory of pending commands
- Support more auth plugins
- Support replaying as fast as possible
- #866
- Support reading from MySQL slow logs
- Support reading from tcpdump files
- Support reading from TiDB statements summary tables
- Support reading from MySQL statements summary tables
Comparison and Report
P1:
- #661
- #683
User Interface
P1:
- #665
- #667
- #669
- #685
P2:
- #723
- #735
- #737
- #740
- #744
- #742
- #748
P3:
- Show the estimated disk usage of the traffic files
- Run as a replayer client
- Langage dominant
- Go
- Étoiles
- 73
- Forks
- 41
- Merge moyen
- 4 h 3 min
- PR mergées (30 j)
- 6
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de pingcap/tiproxy
-
migration:bb7133-tiproxy
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
migration:bb7133-tiproxy
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
[Rust-dataplane] Migration backend handshake must preserve CONNECT_WITH_DB when current-db emptyOuvertemigration:bb7133-tiproxy
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
-
[Rust-dataplane] Migration must not force CONNECT_ATTRS on backend lacking it with empty attrsOuvertemigration:bb7133-tiproxy
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
-
migration:bb7133-tiproxy
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
Toutes les issues de pingcap/tiproxy
Issues similaires
-
area/gateway kind/bug
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
vllm-project/aibrix#3226 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
gencrl: serial numbers that fail to parse are added to the CRL as 0 or a partial valuePeut-être pris @sebxt l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
cloudflare/cfssl#1460 ·
Les mainteneurs répondent en général sous 2 jours
-
bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 75/100
ironcore-dev/cloud-hypervisor-provider#210 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
OpenTollGate/tollgate-module-basic-go#1027 ·
Les mainteneurs répondent en général sous 1 jour