当前位置:网站首页>Distributed database tidb

Distributed database tidb

2022-06-13 07:32:00 Muzijin

TiDB The overall architecture

[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-hivOKRU3-1645796535315)(C:\Users\asus\AppData\Roaming\Typora\typora-user-images\image-20220220160348762.png)]

TiDB server ( managers ) PD Server ( Accept SQl And service ) TiKV Server ( Data kv Storage )

[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-yBBorSy3-1645796535316)(C:\Users\asus\AppData\Roaming\Typora\typora-user-images\image-20220220160311622.png)]

Metadata refers to the tables you have

OlTP and OLAP

[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-fjH5Y8Xn-1645796535316)(C:\Users\asus\AppData\Roaming\Typora\typora-user-images\image-20220220160158127.png)]

TiDb The core feature of

High availability

Horizontal expansion

Highly compatible mysql

There is no need to modify mysql Can be migrated directly to Tidb

tidb It can also be attached to a master-slave structure mysql In the cluster

Distributed transactions

Supporting the standard acid The business of

"One-stop" work style HTAP

coordination TiSpark

Cloud native SQL database

coordination TiOperator Realize automatic operation and maintenance Make deployment configuration and maintenance very simple

Horizontal elastic expansion

As the number of user visits increases TiDB cluster and TiKv Cluster Level increase

High availability

raft agreement

Horizontal expansion

Horizontal expansion Computing power and storage power

At least three Tikv Three TiPD Two TiDB

High availability

It can tolerate instance failure of some components

PD Use raft agreement

TiKv

tikv It's a cluster use raft Guarantee consistency adopt PD Do load balancing scheduling When a single node fails It will affect Region about region Medium leader Node failure will interrupt service Re election about follow No effect about kv Node failure , Will not be available for a period of time ( Default 30 minute ) pd The data on it will be migrated to other kv On

tiKv use ROCksDb Realized TB Level localized storage scheme yes LSM Trees Avoided B+ A large number of random reads and writes caused by the expansion of tree leaf nodes

TiDbserver It's stateless Just expand horizontally

Combined with the etcd mysql HDFS HBASE SPARK Technology

Distributed transactions

Provide optimistic transaction model and pessimistic transaction model

More information can be read

https://juejin.cn/post/7038416869375606791#heading-11

Distributed transactions

Provide optimistic transaction model and pessimistic transaction model

More information can be read

https://juejin.cn/post/7038416869375606791#heading-11
原网站

版权声明
本文为[Muzijin]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202270548255383.html