HubLensGopingcap/tidb
pingcap

tidb

Database#SQL#Distributed Systems#HTAP#Cloud-Native#Go
View on GitHub
40,048

// summary

TiDB is an open-source, cloud-native, distributed SQL database designed for high availability and horizontal scalability. It supports hybrid transactional and analytical processing by utilizing separate row-based and columnar storage engines. The platform maintains strong consistency and is fully compatible with the MySQL 8.0 protocol.

// technical analysis

TiDB is a cloud-native, distributed SQL database designed to provide high availability, horizontal scalability, and strong consistency through a decoupled compute and storage architecture. By utilizing a two-phase commit protocol and the Raft consensus algorithm, it solves the challenges of scaling traditional relational databases while maintaining ACID compliance. The project uniquely supports Hybrid Transactional/Analytical Processing (HTAP) by integrating row-based and columnar storage engines, allowing users to perform complex analytical queries alongside transactional workloads without data silos.

// key highlights

01
Ensures ACID compliance and strong consistency across distributed nodes using a two-phase commit protocol.
02
Supports seamless horizontal and vertical scaling by decoupling the computing and storage layers.
03
Provides high availability and automated failover through the built-in Raft consensus protocol.
04
Enables HTAP capabilities by coordinating between TiKV row-based storage and TiFlash columnar storage.
05
Maintains compatibility with MySQL 8.0, allowing users to migrate applications with minimal or no code changes.
06
Offers flexible deployment options including public clouds, on-premises, and native Kubernetes support via the TiDB Operator.

// use cases

01
Distributed transactions with ACID compliance
02
Hybrid Transactional/Analytical Processing (HTAP)
03
Horizontal and vertical scaling without downtime

// getting started

To begin using TiDB, you can deploy a local test cluster using the TiDB playground, set up a managed cluster via TiDB Cloud, or deploy on Kubernetes using the TiDB Operator. Once the cluster is running, you can connect using standard MySQL drivers or ORMs and explore the SQL documentation to start building your application.