当前位置:网站首页>Tidb cross data center deployment topology
Tidb cross data center deployment topology
2022-07-02 15:08:00 【Tianxiang shop】
This paper takes the typical two places and three centers as an example , Introduce the topology and key parameters of cross data center deployment . The city involved in this example is Shanghai ( namely sha) And Beijing ( namely bja and bjb).
Topology information
| example | Number | Physical machine configuration | BJ IP | SH IP | To configure |
|---|---|---|---|---|---|
| TiDB | 5 | 16 VCore 32GB * 1 | 10.0.1.1 10.0.1.2 10.0.1.3 10.0.1.4 | 10.0.1.5 | Default port Global directory configuration |
| PD | 5 | 4 VCore 8GB * 1 | 10.0.1.6 10.0.1.7 10.0.1.8 10.0.1.9 | 10.0.1.10 | Default port Global directory configuration |
| TiKV | 5 | 16 VCore 32GB 2TB (nvme ssd) * 1 | 10.0.1.11 10.0.1.12 10.0.1.13 10.0.1.14 | 10.0.1.15 | Default port Global directory configuration |
| Monitoring & Grafana | 1 | 4 VCore 8GB * 1 500GB (ssd) | 10.0.1.16 | Default port Global directory configuration |
Topology template
Cross machine room configuration template
above TiDB In the cluster topology file , See adopt TiUP Deploy TiDB Cluster topology file configuration .
Key parameter configuration
This section describes cross data center deployment TiDB The key parameter configuration of the cluster .
TiKV Parameters
Set up gRPC Compression format for , The default is
none. In order to improve the target nodes of the cross machine room deployment scenario gRPC Packet transmission speed , Recommended setting is gzip Format .server.grpc-compression-type: gziplabel To configure
Due to the cross machine room deployment TiKV, To avoid physical downtime leading to Raft Group default 5 Lost in copy 3 copy , The problem of making the cluster unavailable , Can pass label To achieve PD Intelligent scheduling , Ensure the same center 、 Same cabinet 、 With the machine TiKV Instances will not appear Raft Group Yes 3 The situation of the copy .
TiKV To configure
The same physical machine has the same configuration host Level label Information :
config: server.labels: zone: bj dc: bja rack: rack1 host: host2Prevent offsite TiKV Nodes initiate unnecessary Raft The election , You need to relocate TiKV The node initiates the election after the least tick The number and the maximum number of tick Increase the number , The default settings of these two parameters are
0.raftstore.raft-min-election-timeout-ticks: 1000 raftstore.raft-max-election-timeout-ticks: 1020
PD Parameters
PD Metadata information record TiKV Topology information of the cluster , Schedule according to four dimensions Raft Group copy .
replication.location-labels: ["zone","dc","rack","host"]adjustment Raft Group The amount of replica data is 5 , Ensure high availability of cluster .
replication.max-replicas: 5Reject remote machine rooms TiKV Of Raft The duplicate election is Leader.
label-property: reject-leader: - key: "dc" value: "sha"Be careful
TiDB 5.2 And above versions do not support
label-propertyTo configure . To set a replica policy , Please use Placement Rules.
of Label The use of and Raft Group Copy number , See Through topology label Scheduling replicas .
Be careful
- There is no need to manually create
tidbuser ,TiUP cluster The component will automatically create the user on the target host . You can customize the user , It can also be consistent with the users of the central control computer . - If the deployment directory is configured as a relative path , It will be deployed in the user's home directory .
边栏推荐
猜你喜欢

LeetCode - 搜索二维矩阵

C语言习题---(数组)

实用调试技巧

【无标题】LeetCode 2321. 拼接数组的最大分数

Onnx+tensorrt: write preprocessing operations to onnx and complete TRT deployment

Table responsive layout tips
![[c voice] explain the advanced pointer and points for attention (2)](/img/fb/515e25899bd9a2905ee63cb041934a.png)
[c voice] explain the advanced pointer and points for attention (2)

Thoroughly master prototype__ proto__、 Relationship before constructor (JS prototype, prototype chain)

解决el-radio-group 回显后不能编辑问题

LeetCode 209. 长度最小的子数组
随机推荐
[C language] explain the initial and advanced levels of the pointer and points for attention (1)
牛客练习赛101
MFC 定时器使用
Huawei interview question: no palindrome string
哈夫曼树:(1)输入各字符及其权值(2)构造哈夫曼树(3)进行哈夫曼编码(4)查找HC[i],得到各字符的哈夫曼编码
871. Minimum refueling times: simple priority queue (heap) greedy question
2021-2022学年编译原理考试重点[华侨大学]
taobao. logistics. dummy. Send (no logistics delivery processing) interface, Taobao store delivery API interface, Taobao order delivery interface, Taobao R2 interface, Taobao oau2.0 interface
富文本编辑器添加矢量公式(MathType for TinyMCE ,可视化添加)
学习使用php将时间戳转换为大写日期的方法代码示例
如何对 TiDB 进行 TPC-C 测试
CDN 在游戏领域的应用
07_哈希
广州市应急管理局发布7月高温高湿化工安全提醒
N皇后问题的解决
[untitled] leetcode 2321 Maximum score of concatenated array
可视化搭建页面工具的前世今生
TiDB 环境与系统配置检查
Wechat applet uses towxml to display formula
List集合&UML图