@lijiang

Sculpting in time

Do one thing and do it well.
Every story has a beginning and an end.

2-Minute Read

Reference

TIDB architecture

Why use TIDB

  1. the architecture used by the machine is ARM64. 2.

  2. trying to use a distributed database architecture.

  3. solve the high availability problem, when a Raspberry Pi database node is down, it will not affect the data writing.

  4. compared vitess and TIDB, TIDB is more compatible with ARM64, easy to start experimenting.

  5. prepare for the financial trading system later.

Architecture

Components and functions

TIDB Server

TIDB Server is a stateless application, it does not store data itself, load balancing can be placed in front, external application requests to nodes in TIDB Cluster, TIDB server will analyze and calculate the SQL requested by the application and forward the request to the underlying data store TiKV.

PD Server

The meta-information management module of the whole TiDB cluster stores the data distribution of each TiKV node and the overall topology of the cluster. Based on the data distribution status reported by TiKV nodes in real time, PD server issues data scheduling commands to TiKV nodes.

Storage Server

TiKV is responsible for data storage, it is a key-Value distributed storage engine that provides transactions, the basic unit of storage is Region, each Region stores data of one Key Range, each TiKV node will be responsible for multiple Regions, after TiDB’s SQL parses the SQL, it will convert the execution plan of SQL into the actual call to TiKV API. TiDB SQL will transform the execution plan of SQL into actual calls to TiKV API after parsing SQL, and all the SQL data are stored in TiKV.

TiFLASH Server

Special storage node, data storage is stored in columnar mode, and the main function is to accelerate the scenario of analysis type.

Recent Posts

Categories

About

Keep thinking, Stay curious
Always be sensitive to new things