Skip to content

Commit

Permalink
tiup-playground: update instructions for deploying TiProxy (#19775) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Dec 23, 2024
1 parent 5d6e229 commit 9bd24bf
Showing 1 changed file with 28 additions and 15 deletions.
43 changes: 28 additions & 15 deletions tiup/tiup-playground.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,25 +136,38 @@ tiup playground scale-in --pid 86526

[TiProxy](/tiproxy/tiproxy-overview.md) is the official proxy component from PingCAP, placed between the client and the TiDB server to provide load balancing, connection persistence, service discovery, and other features for TiDB.

Starting from TiUP v1.14.1, you can deploy TiProxy for your cluster using TiUP Playground, as in the following example:
Starting from TiUP v1.15.0, you can deploy TiProxy for your cluster using TiUP Playground.

```shell
tiup playground v8.5.0 --tiproxy 1
```
1. Create a `tidb.toml` file and add the following configuration:

For more information about TiProxy deployment and usage, see [TiProxy documentation](/tiproxy/tiproxy-overview.md#installation-and-usage).
```
graceful-wait-before-shutdown=15
```
In the playground component, TiProxy-related command-line flags are as follows:
This configuration item controls the duration (in seconds) that TiDB waits before shutting down the server, avoiding client disconnections during cluster scaling-in operations.
```bash
Flags:
--tiproxy int The number of TiProxy nodes in the cluster. If not specified, TiProxy is not deployed.
--tiproxy.binpath string TiProxy instance binary path.
--tiproxy.config string TiProxy instance configuration file.
--tiproxy.host host Playground TiProxy host. If not provided, TiProxy will still use host flag as its host.
--tiproxy.port int Playground TiProxy port. If not provided, TiProxy will use 6000 as its port.
--tiproxy.timeout int TiProxy maximum wait time in seconds for starting. 0 means no limit (default 60).
```
2. Start the TiDB cluster:
```shell
tiup playground v8.5.0 --tiproxy 1 --db.config tidb.toml
```
In the playground component, TiProxy-related command-line flags are as follows:
```bash
Flags:
--tiproxy int The number of TiProxy nodes in the cluster. If not specified, TiProxy is not deployed.
--tiproxy.binpath string TiProxy instance binary path.
--tiproxy.config string TiProxy instance configuration file.
--tiproxy.host host Playground TiProxy host. If not provided, TiProxy will still use host flag as its host.
--tiproxy.port int Playground TiProxy port. If not provided, TiProxy will use 6000 as its port.
--tiproxy.timeout int TiProxy maximum wait time in seconds for starting. 0 means no limit (default 60).
--tiproxy.version string The version of TiProxy. If not specified, the latest version of TiProxy is deployed.
```
For more information about deploying and using TiProxy, see [TiProxy installation and usage](/tiproxy/tiproxy-overview.md#installation-and-usage).
To use the TiProxy client program `tiproxyctl`, see [Install TiProxy Control](/tiproxy/tiproxy-command-line-flags.md#install-tiproxy-control).
## Deploy PD microservices
Expand Down

0 comments on commit 9bd24bf

Please sign in to comment.