Tidb experience record

I have been looking for a distributed database solution. I have seen MyCat. MyCat is a database middle-tier product. It can provide a theoretically infinitely scalable large database through database partitioning technology. The core behind it is MySQL. I don’t think it is the ultimate solution, but Can be considered an over-the-top solution.

 

Tidb came into my field of vision and thought the idea was interesting. It provides relational database storage services with MySQL protocol, and the core is NoSQL technology to realize distributed storage and distributed computing. Without looking at its core parts, from the perspective of providing compatible MySQL services to the outside world, this is a very smart choice, which can attract a huge MySQL user base to try it out.

 

We have developed many projects based on MySQL. One of the bottlenecks we are currently facing is that as the amount of data increases, storage space expansion and query performance are faced with relatively large problems. The storage capacity of a server is always limited. How can the storage resources of other servers be effectively utilized? and computing resources.

 

In general scenarios, MySQL builds a master-slave environment, which means that when writing data, it must be written to the master server, and other slave servers can synchronize to the latest data. In this way, the read-write separation can be achieved by querying the slave server, which greatly reduces the pressure on the master server.

 

However, as the amount of data continues to grow, the storage of the master server and the slave server will be difficult to meet. At this time, the data partition scheme may be considered to split the database into multiple and store them on different servers, but this requires migration. A large amount of data may be migrated multiple times without careful consideration. When the amount of data reaches a certain scale, it will take a long time to migrate data. And applications often have to adapt to this kind of database splitting to make changes, which can be costly.

 

Is there a solution that can elastically expand the storage and computing resources of the database without complex data partitioning and changes to related applications?

 

This is Tidb's solution. The underlying data storage and computing resources can be dynamically expanded, and the front-end data access service is opened with a MySQL-compatible protocol, which is perfect.

 

According to the official introduction of Tidb, they have spent considerable effort in compatibility with MySQL. It is said that they directly test their code with the unit test code of MySQL to ensure perfect compatibility.

 

I tried to set up a Tidb environment with 3 nodes, transfer the log data of one of our system's interface calls, and write it in real time. At the same time, we also developed a query for statistical analysis, and tested the compatibility and performance with MySQL. The overall evaluation feels quite ideal, and we need to continue testing for a period of time to observe.

 

According to the Tidb official website, we hope to meet 100% OLTP database and 80% OLAP database application scenarios. This goal is very ambitious, and we expect them to achieve it, so that we can have a quite perfect database solution. .

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326356333&siteId=291194637