Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tiup-playground: add info about TiProxy (#19769) #19771

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions tiup/tiup-playground.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,38 @@ You can specify a `pid` in the `tiup playground scale-in` command to scale in th
```shell
tiup playground scale-in --pid 86526
```

## Deploy TiProxy

[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.15.0, you can deploy TiProxy for your cluster using TiUP Playground.

1. Create a `tidb.toml` file and add the following configuration:

```
graceful-wait-before-shutdown=15
```

This configuration item controls the duration (in seconds) that TiDB waits before shutting down the server, avoiding client disconnections during cluster scaling-in operations.

2. Start the TiDB cluster:

```shell
tiup playground v8.1.1 --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).
Loading