Skip to content

Commit

Permalink
This is an automated cherry-pick of #19594
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
  • Loading branch information
lilin90 authored and ti-chi-bot committed Jan 20, 2025
1 parent b3d95be commit 7f196c9
Show file tree
Hide file tree
Showing 8 changed files with 228 additions and 0 deletions.
4 changes: 4 additions & 0 deletions geo-distributed-deployment-topology.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ summary: 介绍跨数据中心部署 TiDB 集群的拓扑结构。
| TiKV | 5 | 16 VCore 32GB 4TB (nvme ssd) * 1 | 10.0.1.11 <br/> 10.0.1.12 <br/> 10.0.1.13 <br/> 10.0.1.14 | 10.0.1.15 | 默认端口 <br/> 全局目录配置 |
| Monitoring & Grafana | 1 | 4 VCore 8GB * 1 500GB (ssd) | 10.0.1.16 || 默认端口 <br/> 全局目录配置 |

> **注意:**
>
> 该表中拓扑实例的 IP 为示例 IP。在实际部署时,请替换为实际的 IP。
### 拓扑模版

<details>
Expand Down
4 changes: 4 additions & 0 deletions hybrid-deployment-topology.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ summary: 介绍混合部署 TiDB 集群的拓扑结构。
| TiKV | 6 | 32 VCore 64GB | 10.0.1.7<br/> 10.0.1.8<br/> 10.0.1.9 | 1. 区分实例级别的 port、status_port;<br/> 2. 配置全局参数 readpool、storage 以及 raftstore;<br/> 3. 配置实例级别 host 维度的 labels;<br/> 4. 配置 numa 绑核操作|
| Monitoring & Grafana | 1 | 4 VCore 8GB * 1 500GB (ssd) | 10.0.1.10 | 默认配置 |

> **注意:**
>
> 该表中拓扑实例的 IP 为示例 IP。在实际部署时,请替换为实际的 IP。
### 拓扑模版

<details>
Expand Down
4 changes: 4 additions & 0 deletions minimal-deployment-topology.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ summary: 介绍 TiDB 集群的最小拓扑。
| TiKV | 3 | 16 VCore 32 GiB <br/> 2 TiB (NVMe SSD) 用于存储 | 10.0.1.7 <br/> 10.0.1.8 <br/> 10.0.1.9 | 默认端口 <br/> 全局目录配置 |
| Monitoring & Grafana | 1 | 4 VCore 8 GiB <br/> 500 GiB (SSD) 用于存储 | 10.0.1.10 | 默认端口 <br/> 全局目录配置 |

> **注意:**
>
> 该表中拓扑实例的 IP 为示例 IP。在实际部署时,请替换为实际的 IP。
### 拓扑模版

<details>
Expand Down
96 changes: 96 additions & 0 deletions pd-microservices-deployment-topology.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
title: PD 微服务部署拓扑
summary: 了解在部署最小拓扑集群的基础上,部署 PD 微服务的拓扑结构。
---

# PD 微服务部署拓扑

本文介绍在部署最小拓扑集群的基础上,部署 [PD 微服务](/pd-microservices.md)的拓扑结构。

## 拓扑信息

| 实例 | 个数 | 物理机配置 | IP | 配置 |
| :------------------- | :--- | :-------------------------------- | :---------------------------------------- | :-------------------------- |
| TiDB | 2 | 16 VCore 32GB \* 1 | 10.0.1.1 <br/> 10.0.1.2 | 默认端口 <br/> 全局目录配置 |
| PD | 3 | 4 VCore 8GB \* 1 | 10.0.1.3 <br/> 10.0.1.4 <br/> 10.0.1.5 | 默认端口 <br/> 全局目录配置 |
| TSO | 2 | 4 VCore 8GB \* 1 | 10.0.1.6 <br/> 10.0.1.7 | 默认端口 <br/> 全局目录配置 |
| Scheduling | 2 | 4 VCore 8GB \* 1 | 10.0.1.8 <br/> 10.0.1.9 | 默认端口 <br/> 全局目录配置 |
| TiKV | 3 | 16 VCore 32GB 2TB (nvme ssd) \* 1 | 10.0.1.10 <br/> 10.0.1.11 <br/> 10.0.1.12 | 默认端口 <br/> 全局目录配置 |
| Monitoring & Grafana | 1 | 4 VCore 8GB \* 1 500GB (ssd) | 10.0.1.13 | 默认端口 <br/> 全局目录配置 |

> **注意:**
>
> 该表中拓扑实例的 IP 为示例 IP。在实际部署时,请替换为实际的 IP。
### 拓扑模版

<details>
<summary>简单 PD 微服务配置模版</summary>

```yaml
# # Global variables are applied to all deployments and used as the default value of
# # the deployments if a specific deployment value is missing.
global:
user: "tidb"
ssh_port: 22
deploy_dir: "/tidb-deploy"
data_dir: "/tidb-data"
listen_host: 0.0.0.0
arch: "amd64"
pd_mode: "ms" # To enable PD microservices, you must specify this field as "ms".

monitored:
node_exporter_port: 9200
blackbox_exporter_port: 9215

# # Specifies the configuration of PD servers.
pd_servers:
- host: 10.0.1.3
- host: 10.0.1.4
- host: 10.0.1.5

# # Specifies the configuration of TiDB servers.
tidb_servers:
- host: 10.0.1.1
- host: 10.0.1.2

# # Specifies the configuration of TiKV servers.
tikv_servers:
- host: 10.0.1.10
- host: 10.0.1.11
- host: 10.0.1.12

# # Specifies the configuration of TSO servers.
tso_servers:
- host: 10.0.1.6
- host: 10.0.1.7

# # Specifies the configuration of Scheduling servers.
scheduling_servers:
- host: 10.0.1.8
- host: 10.0.1.9

# # Specifies the configuration of Prometheus servers.
monitoring_servers:
- host: 10.0.1.13

# # Specifies the configuration of Grafana servers.
grafana_servers:
- host: 10.0.1.13
```
</details>
以上 TiDB 集群拓扑文件中,详细的配置项说明见[通过 TiUP 部署 TiDB 集群的拓扑文件配置](/tiup/tiup-cluster-topology-reference.md)。
### 关键参数介绍
- `tso_servers` 实例级别配置 `host` 目前只支持 IP 地址,不支持域名。
- TSO 具体的参数配置介绍可参考 [TSO 参数配置](/tso-configuration-file.md)。
- `scheduling_servers` 实例级别配置 `host` 目前只支持 IP 地址,不支持域名。
- Scheduling 具体的参数配置介绍可参考 [Scheduling 参数配置](/scheduling-configuration-file.md)。

> **注意:**
>
> - 无需手动创建配置文件中的 `tidb` 用户,TiUP cluster 组件会在目标主机上自动创建该用户。可以自定义用户,也可以和中控机的用户保持一致。
> - 如果部署目录配置为相对路径,会部署在用户的 Home 目录下。
4 changes: 4 additions & 0 deletions ticdc-deployment-topology.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ summary: 介绍 TiCDC 部署 TiDB 集群的拓扑结构。
| CDC | 3 | 8 VCore 16GB * 1 | 10.0.1.11 <br/> 10.0.1.12 <br/> 10.0.1.13 | 默认端口 <br/> 全局目录配置 |
| Monitoring & Grafana | 1 | 4 VCore 8GB * 1 500GB (ssd) | 10.0.1.11 | 默认端口 <br/> 全局目录配置 |

> **注意:**
>
> 该表中拓扑实例的 IP 为示例 IP。在实际部署时,请替换为实际的 IP。
### 拓扑模版

<details>
Expand Down
4 changes: 4 additions & 0 deletions tiflash-deployment-topology.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ summary: 了解在部署最小拓扑集群的基础上,部署 TiFlash 的拓
| TiFlash | 1 | 32 VCore 64 GB 2TB (nvme ssd) * 1 | 10.0.1.11 | 默认端口 <br/> 全局目录配置 |
| Monitoring & Grafana | 1 | 4 VCore 8GB * 1 500GB (ssd) | 10.0.1.10 | 默认端口 <br/> 全局目录配置 |

> **注意:**
>
> 该表中拓扑实例的 IP 为示例 IP。在实际部署时,请替换为实际的 IP。
### 拓扑模版

<details>
Expand Down
108 changes: 108 additions & 0 deletions tiproxy/tiproxy-deployment-topology.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
---
title: TiProxy 部署拓扑
summary: 了解在部署最小拓扑集群的基础上,部署 TiProxy 的拓扑结构。
---

# TiProxy 部署拓扑

本文介绍在部署最小拓扑集群的基础上,部署 [TiProxy](/tiproxy/tiproxy-overview.md) 的拓扑结构。

其他部署方式,请参考以下文档:

- 使用 TiDB Operator 部署 TiProxy,请参见 [TiDB Operator](https://docs.pingcap.com/zh/tidb-in-kubernetes/stable/deploy-tiproxy) 文档。
- 使用 TiUP 本地快速部署 TiProxy,请参见[部署 TiProxy](/tiup/tiup-playground.md#部署-tiproxy)
- 使用 TiUP 部署 TiProxy,请参见 [TiProxy 安装和使用](/tiproxy/tiproxy-overview.md#安装和使用)

TiProxy 是 TiDB 的 L7 代理,可以平衡连接并迁移会话。

## 拓扑信息

| 实例 | 个数 | 物理机配置 | IP | 配置 |
| :-- | :-- | :-- | :-- | :-- |
| TiDB | 3 | 16 VCore 32GB * 3 | 10.0.1.4 <br/> 10.0.1.5 <br/> 10.0.1.6 | 默认端口 <br/> 全局目录配置 |
| PD | 3 | 4 VCore 8GB * 3 | 10.0.1.1 <br/> 10.0.1.2 <br/> 10.0.1.3 | 默认端口 <br/> 全局目录配置 |
| TiKV | 3 | 16 VCore 32GB 2TB (nvme ssd) * 3 | 10.0.1.7 <br/> 10.0.1.8 <br/> 10.0.1.9 | 默认端口 <br/> 全局目录配置 |
| TiProxy | 2 | 4 VCore 8 GB * 1 | 10.0.1.11 <br/> 10.0.1.12 | 默认端口 <br/> 全局目录配置 |
| Monitoring & Grafana | 1 | 4 VCore 8GB * 1 500GB (ssd) | 10.0.1.13 | 默认端口 <br/> 全局目录配置 |

> **注意:**
>
> 该表中拓扑实例的 IP 为示例 IP。在实际部署时,请替换为实际的 IP。
### 拓扑模版

<details>
<summary>简单 TiProxy 配置模版</summary>

```yaml
# # Global variables are applied to all deployments and used as the default value of
# # the deployments if a specific deployment value is missing.
global:
user: "tidb"
ssh_port: 22
deploy_dir: "/tidb-deploy"
data_dir: "/tidb-data"
component_versions:
tiproxy: "v1.2.0"
server_configs:
tidb:
graceful-wait-before-shutdown: 15
tiproxy:
ha.virtual-ip: "10.0.1.10/24"
ha.interface: "eth0"
graceful-wait-before-shutdown: 15

pd_servers:
- host: 10.0.1.1
- host: 10.0.1.2
- host: 10.0.1.3

tidb_servers:
- host: 10.0.1.4
- host: 10.0.1.5
- host: 10.0.1.6

tikv_servers:
- host: 10.0.1.7
- host: 10.0.1.8
- host: 10.0.1.9

tiproxy_servers:
- host: 10.0.1.11
deploy_dir: "/tiproxy-deploy"
data_dir: "/tiproxy-data"
port: 6000
status_port: 3080
config:
labels: { zone: "east" }
- host: 10.0.1.12
deploy_dir: "/tiproxy-deploy"
data_dir: "/tiproxy-data"
port: 6000
status_port: 3080
config:
labels: { zone: "west" }

monitoring_servers:
- host: 10.0.1.13

grafana_servers:
- host: 10.0.1.13

alertmanager_servers:
- host: 10.0.1.13
```
</details>
以上 TiDB 集群拓扑文件中,详细的配置项说明见[通过 TiUP 部署 TiDB 集群的拓扑文件配置](/tiup/tiup-cluster-topology-reference.md)。
### 关键参数介绍
- `tiproxy_servers` 实例级别配置 `"-host"` 目前只支持 IP,不支持域名。
- TiProxy 具体的参数配置介绍可参考 [TiProxy 参数配置](/tiproxy/tiproxy-configuration.md)。

> **注意:**
>
> - 无需手动创建配置文件中的 `tidb` 用户,TiUP cluster 组件会在目标主机上自动创建该用户。可以自定义用户,也可以和中控机的用户保持一致。
> - 如果部署目录配置为相对路径,会部署在用户的 Home 目录下。
4 changes: 4 additions & 0 deletions tispark-deployment-topology.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ summary: 介绍 TiUP 部署包含 TiSpark 组件的 TiDB 集群的拓扑结构
| TiSpark | 3 | 8 VCore 16GB * 1 | 10.0.1.21 (master) <br/> 10.0.1.22 (worker) <br/> 10.0.1.23 (worker) | 默认端口 <br/> 全局目录配置 |
| Monitoring & Grafana | 1 | 4 VCore 8GB * 1 500GB (ssd) | 10.0.1.11 | 默认端口 <br/> 全局目录配置 |

> **注意:**
>
> 该表中拓扑实例的 IP 为示例 IP。在实际部署时,请替换为实际的 IP。
### 拓扑模版

<details>
Expand Down

0 comments on commit 7f196c9

Please sign in to comment.