Skip to content

Commit c9121a9

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 32a1069 + 3264ea1 commit c9121a9

File tree

1 file changed

+37
-2
lines changed

1 file changed

+37
-2
lines changed

tiproxy/tiproxy-overview.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,32 @@ TiProxy 是可选组件,你也可以使用第三方的代理组件,或者直
1111

1212
TiProxy 示意图如下:
1313

14-
<img src="https://docs-download.pingcap.com/media/images/docs-cn/tiproxy/tiproxy-architecture.png" alt="TiProxy 架构" width="500" />
14+
```mermaid
15+
graph TD
16+
Client[Client]
17+
18+
Client --> ProxyLayer
19+
20+
subgraph ProxyLayer["proxy layer"]
21+
TiProxy1[TiProxy] ~~~ TiProxy2[TiProxy]
22+
end
23+
24+
ProxyLayer --> ComputeLayer
25+
26+
subgraph ComputeLayer["compute layer"]
27+
TiDB1[TiDB] ~~~ TiDB2[TiDB] ~~~ TiDB3[TiDB]
28+
end
29+
30+
ComputeLayer --> StorageLayer
31+
32+
subgraph StorageLayer["storage layer"]
33+
TiKV1[TiKV] ~~~ TiKV2[TiKV] ~~~ TiFlash[TiFlash]
34+
end
35+
36+
style ProxyLayer stroke-dasharray: 5 5
37+
style ComputeLayer stroke-dasharray: 5 5
38+
style StorageLayer stroke-dasharray: 5 5
39+
```
1540

1641
## 主要功能
1742

@@ -23,7 +48,17 @@ TiProxy 在保持客户端连接不变的情况下,能将一台 TiDB server
2348

2449
如下图所示,原先客户端通过 TiProxy 连接到 TiDB 1 上,连接迁移之后,客户端实际连接到 TiDB 2 上。在 TiDB 1 即将下线或 TiDB 1 上的连接数比 TiDB 2 上的连接数超过设定阈值时,会触发连接迁移。连接迁移对客户端无感知。
2550

26-
<img src="https://docs-download.pingcap.com/media/images/docs-cn/tiproxy/tiproxy-session-migration.png" alt="TiProxy 连接迁移" width="400" />
51+
```mermaid
52+
graph TD
53+
Client[Client]
54+
TiProxy[TiProxy]
55+
TiDB1[TiDB 1]
56+
TiDB2[TiDB 2]
57+
58+
Client --> TiProxy
59+
TiProxy -.-x TiDB1
60+
TiProxy --> TiDB2
61+
```
2762

2863
连接迁移通常发生在以下场景:
2964

0 commit comments

Comments
 (0)