当前位置:网站首页>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 .
边栏推荐
- taobao. trade. Get (get some information of a single transaction), Taobao store order interface, Taobao oauth2.0 interface, Taobao R2 interface code docking and sharing
- 【NOI模拟赛】刮痧(动态规划)
- C语言习题---(数组)
- The past and present lives of visual page building tools
- CodeCraft-22 and Codeforces Round #795 (Div. 2)D,E
- kibana 基础操作
- 【题解】Educational Codeforces Round 82
- buuctf-pwn write-ups (7)
- 【无标题】LeetCode 2321. 拼接数组的最大分数
- C language exercises - (array)
猜你喜欢

How does CTO help the business?

【C语言】详解指针的初阶和进阶以及注意点(1)

GeoServer offline map service construction and layer Publishing

可视化搭建页面工具的前世今生

LeetCode 209. 长度最小的子数组

MFC 定时器使用

Error: NPM warn config global ` --global`, `--local` are deprecated Use `--location=global` instead.

CodeCraft-22 and Codeforces Round #795 (Div. 2)D,E

Socket and socket address

C language exercises - (array)
随机推荐
C thread transfer parameters
Dragonfly low code security tool platform development path
【NOI模拟赛】刮痧(动态规划)
taobao. trades. sold. Get query the transaction data that the seller has sold (according to the creation time), Taobao store sales order query API interface, Taobao R2 interface, Taobao oauth2.0 trans
LeetCode 2320. Count the number of ways to place the house
Simple verification code generator for 51 single chip microcomputer experiment
LeetCode 2320. 统计放置房子的方式数
TiDB数据迁移工具概览
php获取数组中键值最大数组项的索引值的方法
Leetcode - Search 2D matrix
Base64 编码原来还可以这么理解
TiDB混合部署拓扑
Principles, language, compilation, interpretation
[noi simulation] Elis (greedy, simulation)
蜻蜓低代码安全工具平台开发之路
Map介绍
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
为什么只会编程的程序员无法成为优秀的开发者?
Obsidian installs third-party plug-ins - unable to load plug-ins
Implement a server with multi process concurrency