You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: tiproxy/tiproxy-configuration.md
+14-3
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,9 @@ summary: Learn how to configure TiProxy.
5
5
6
6
# TiProxy Configuration File
7
7
8
-
This document introduces the configuration parameters related to the deployment and use of TiProxy. The following is an example configuration:
8
+
This document introduces the configuration parameters related to the deployment and use of TiProxy. For the configurations of TiUP deployment topology, see [tiproxy-servers configurations](/tiup/tiup-cluster-topology-reference.md#tiproxy_servers).
9
+
10
+
The following is an example configuration:
9
11
10
12
```toml
11
13
[proxy]
@@ -43,13 +45,13 @@ Configuration for SQL port.
43
45
44
46
+ Default value: `0.0.0.0:6000`
45
47
+ Support hot-reload: no
46
-
+SQL gateway address. The format is `<ip>:<port>`.
48
+
+The listening address of the SQL service. The format is `<ip>:<port>`. This configuration item is automatically set when you deploy TiProxy using TiUP or TiDB Operator.
47
49
48
50
#### `advertise-addr`
49
51
50
52
+ Default value: `""`
51
53
+ Support hot-reload: no
52
-
+ Specifies the address that clients use to connect to this TiProxy instance. This configuration item is automatically set when you deploy TiProxy using TiUP or TiDB Operator. If not set, the external IP address of the TiProxy instance is used.
54
+
+ Specifies the address that other components use to connect to this TiProxy instance. This address only contains the host name, not the port. This address might be different from the host name in [`addr`](#addr). For example, if the `Subject Alternative Name` in TiProxy's TLS certificate contains only the domain name, other components will fail to connect to TiProxy via IP. This configuration item is automatically set when you deploy TiProxy using TiUP or TiDB Operator. If not set, the external IP address of the TiProxy instance is used.
53
55
54
56
#### `graceful-wait-before-shutdown`
55
57
@@ -136,6 +138,15 @@ High availability configurations for TiProxy.
136
138
+ Support hot-reload: no
137
139
+ Specifies the virtual IP address in the CIDR format, such as `"10.0.1.10/24"`. In a cluster with multiple TiProxy instances, only one instance binds to the virtual IP. If this instance goes offline, another TiProxy instance will automatically bind to the IP, ensuring clients can always connect to an available TiProxy through the virtual IP.
138
140
141
+
The following is an example configuration:
142
+
143
+
```yaml
144
+
server_configs:
145
+
tiproxy:
146
+
ha.virtual-ip: "10.0.1.10/24"
147
+
ha.interface: "eth0"
148
+
```
149
+
139
150
> **Note:**
140
151
>
141
152
> - Virtual IP is only supported on Linux operating systems.
Copy file name to clipboardexpand all lines: tiproxy/tiproxy-overview.md
+7-8
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,12 @@ It is recommended that you use TiProxy for the scenarios that TiProxy is suitabl
61
61
62
62
## Installation and usage
63
63
64
-
This section describes how to deploy and change TiProxy using TiUP. For how to deploy TiProxy using TiDB Operator in Kubernetes, see [TiDB Operator documentation](https://docs.pingcap.com/tidb-in-kubernetes/stable/deploy-tiproxy).
64
+
This section describes how to deploy and change TiProxy using TiUP.
65
+
66
+
For other deployment methods, refer to the following documents:
67
+
68
+
- To deploy TiProxy using TiDB Operator, see the [TiDB Operator](https://docs.pingcap.com/zh/tidb-in-kubernetes/stable/deploy-tiproxy) documentation.
69
+
- To quickly deploy TiProxy locally using TiUP, see [Deploy TiProxy](/tiup/tiup-playground.md#deploy-tiproxy).
65
70
66
71
### Deploy TiProxy
67
72
@@ -83,9 +88,6 @@ This section describes how to deploy and change TiProxy using TiUP. For how to d
@@ -100,7 +102,7 @@ This section describes how to deploy and change TiProxy using TiUP. For how to d
100
102
101
103
It is recommended to specify the version number of TiProxy in the topology configuration so that TiProxy will not be upgraded when you upgrade the TiDB cluster through [`tiup cluster upgrade`](/tiup/tiup-component-cluster-upgrade.md). Otherwise, the client connection might be disconnected during TiProxy upgrade.
102
104
103
-
To configure TiProxy configuration items, see [TiProxy configuration](/tiproxy/tiproxy-configuration.md).
105
+
To configure TiProxy configuration items, see [TiProxy configuration](/tiproxy/tiproxy-configuration.md). For more configurations of TiUP deployment topology, see [tiproxy-servers configurations](/tiup/tiup-cluster-topology-reference.md#tiproxy_servers).
104
106
105
107
A configuration example is as follows:
106
108
@@ -109,9 +111,6 @@ This section describes how to deploy and change TiProxy using TiUP. For how to d
Copy file name to clipboardexpand all lines: tiup/tiup-cluster-topology-reference.md
+12
Original file line number
Diff line number
Diff line change
@@ -435,6 +435,8 @@ tiflash_servers:
435
435
436
436
- `port`: The listening port of the TiProxy SQL services. The default value is `6000`.
437
437
438
+
- `status_port`: The listening port of the TiProxy status service. It is used to view the status of the TiProxy services from the external via HTTP requests. The default value is `3080`.
439
+
438
440
- `deploy_dir`: Specifies the deployment directory. If it is not specified or specified as a relative directory, the directory is generated based on the `deploy_dir` directory configured in `global`.
439
441
440
442
- `data_dir`: Specifies the data directory. If it is not specified or specified as a relative directory, the directory is generated based on the `data_dir` directory configured in `global`.
@@ -461,9 +463,19 @@ A `tiproxy_servers` configuration example is as follows:
461
463
```yaml
462
464
tiproxy_servers:
463
465
- host: 10.0.1.21
466
+
port: 6000
467
+
status_port: 3080
468
+
config:
469
+
labels: { zone: "zone1" }
464
470
- host: 10.0.1.22
471
+
port: 6000
472
+
status_port: 3080
473
+
config:
474
+
labels: { zone: "zone2" }
465
475
```
466
476
477
+
For more configuration examples, see [TiProxy Deployment Topology](/tiproxy/tiproxy-deployment-topology.md).
478
+
467
479
### `kvcdc_servers`
468
480
469
481
`kvcdc_servers` specifies the machines to which the [TiKV-CDC](https://tikv.org/docs/7.1/concepts/explore-tikv-features/cdc/cdc/) services are deployed. It also specifies the service configuration on each machine. `kvcdc_servers` is an array. Each array element contains the following fields:
0 commit comments