Skip to content

Commit

Permalink
best practice: add link to tidb config networks (pingcap#10932)
Browse files Browse the repository at this point in the history
  • Loading branch information
shichun-0415 authored Aug 16, 2022
1 parent 9e9d48c commit 73562b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions best-practices/haproxy-best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,14 @@ listen tidb-cluster # 配置 database 负载均衡。
如要通过 `SHOW PROCESSLIST` 查看连接来源 IP,需要配置使用 [PROXY 协议](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt)连接 TiDB。

```yaml
server tidb-1 10.9.18.229:4000 send-proxy check inter 2000 rise 2 fall 3
server tidb-1 10.9.18.229:4000 send-proxy check inter 2000 rise 2 fall 3
server tidb-2 10.9.39.208:4000 send-proxy check inter 2000 rise 2 fall 3
server tidb-3 10.9.64.166:4000 send-proxy check inter 2000 rise 2 fall 3
```

> **注意:**
>
> 使用 PROXY 协议时,你需要在 tidb-server `proxy-protocol.networks` 配置文件中添加对应的参数
> 使用 PROXY 协议时,你需要在 tidb-server 的配置文件中设置 [`proxy-protocol.networks`](/tidb-configuration-file.md#networks)

### 启动 HAProxy

Expand Down

0 comments on commit 73562b3

Please sign in to comment.