Here comes the open source TenDB Cluster distributed database for Tencent games

TenDB Cluster is a MySQL distributed relational database solution provided by the CROS DBA team of Tencent Games. It mainly includes features such as compatibility with MySQL protocol, transparent sub-database sub-table, load balancing, high availability, and online expansion. Business development can only focus on the development and operation of business logic, without the need to write data fragmentation logic, and there is no need to care about the load pressure of the DB storage layer in the case of massive user concurrency.

Architecture introduction

TenDB Cluster mainly has three modules: access layer TSpider, storage layer TenDB, and control layer Tdbctl. The architecture diagram is as follows:

TSpider is the access layer of TenDB Cluster. TSpider is customized and developed based on the open source storage engine spider on MariaDB 10.3.7. It is the largest distributed MySQL storage engine in the game scene. The spider storage engine is similar to the operation mechanism of the MySQL partition table. The original author of spider Kentoku SHIBA has innovatively implemented the cross-machine network partition feature, which provides a better choice for the MySQL ecosystem to solve the scalability problem.

As a MySQL engine, TSpider naturally supports the MySQL protocol and can request TSpider using the MySQL standard API.

After TSpider is connected to the application request, it will rewrite the SQL through data routing rules and then distribute it to the corresponding storage node TenDB for execution, and then process the returned result of TenDB and finally return it to the application layer. TSpider itself does not store data, it is basically stateless (the configuration of each TSpider node needs to be different), and it can be expanded horizontally infinitely. The application layer can access multiple peer TSpider nodes through a uniform access address provided by load balancing components (such as LVS, L5, and even DNS).

 

TenDB is the data storage layer of TenDB Cluster. TenDB is customized based on Percona Server 5.7.20, and additionally provides features such as online field addition, large field compression, binlog compression/speed limit, and performance optimization, distributed transaction optimization, BUG FIX, etc. Usually a cluster will have multiple TenDB instances to store cluster data in a balanced manner. Each TenDB can use active/standby deployment or MGR to ensure the availability of the storage layer.

 

Tdbctl is the central control module of TenDB Cluster. The main function of Tdbctl is cluster routing configuration management, cluster change, cluster switching and certain cluster monitoring.

Instructions for use

TenDB Cluster is committed to providing the same usage method as single-instance MySQL. For specific deployment and usage, see the document:

https://tendbcluster.com/book-cn/

Open source address

Everyone is welcome to participate in any form of collaboration: including but not limited to document suggestions, function suggestions, BUG fixes, and function submissions. The warehouses corresponding to TenDBCluster components and documents are as follows:

TSpider: 

https://github.com/Tencent/TenDBCluster-TSpider

TenDB: 

https://github.com/Tencent/TenDBCluster-TenDB

Tdbctl: 

https://github.com/Tencent/TenDBCluster-Tdbctl

TenDB Cluster Manual: https://tendbcluster.com/

https://github.com/Tencent/TenDBCluster-TSpider

(Click to read the original text at the end of the article to access directly)

Please give the project a Star!

Welcome to raise your issue and PR!

 Domestic mirror address:

https://git.code.tencent.com/Tencent_Open_Source/TenDBCluster-TSpider

(You can access public projects only after logging in)

The Tencent Worker Bee source code system provides open source developers with a complete and latest domestic image of Tencent open source projects

The full text is over.

Enjoy MySQL & MariaDB :)

Teacher Ye's "MySQL Core Optimization" class has been upgraded to MySQL 8.0, scan the code to start the journey of MySQL 8.0 practice

Guess you like

Origin blog.csdn.net/n88Lpo/article/details/108426374