Support traffic replay
メンテナーはふだん 1 日以内に返信
@djshow832 がすでに取り組んでいます。
2024年8月26日 から。
評価
この issue はまだ評価されていません。
説明
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
- 主要言語
- Go
- スター
- 73
- フォーク
- 41
- 平均マージ
- 12時間 38分
- マージ済み PR(30日)
- 21
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pingcap/tiproxy のほかの issue
-
contribution first-time-contributor type/enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
pingcap/tiproxy#1239 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
type/enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
severity/minor type/bug
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
-
type/bug
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
メンテナーはふだん 1 日以内に返信
pingcap/tiproxy の issue をすべて見る
似ている issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
AOSSIE-Org/DebateAI#611 ·
メンテナーはふだん 3 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
MHSanaei/3x-ui#6737 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
terraform-provider
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
ClickHouse/terraform-provider-clickhousedbops#281 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
open-telemetry/opentelemetry-go-compile-instrumentation#1450 ·
メンテナーはふだん 2 日以内に返信