Repolode
pingcap

pingcap/tidb

Open-source distributed SQL database with MySQL 8.0 compatibility, ACID transactions, HTAP analytics, and vector search.

Open-source alternative to:Amazon AuroraCockroachDB

Stars
40,667
Forks
6,275
Open issues
7,338
Last commit
16 hours ago

What is it?

TiDB is a cloud-native distributed SQL database designed for high availability, horizontal and vertical scaling, and strong consistency. It uses a two-phase commit protocol so transactions can span multiple nodes while keeping ACID guarantees. Data is replicated with the Raft consensus protocol, and transactions commit only after a majority of replicas have written them, which allows automated failover when some replicas fail.

TiDB separates compute from storage. TiKV is the row-based storage engine, and TiFlash is a columnar engine that replicates from TiKV in real time, so analytical queries and transactional workloads can run against the same data. TiDB is compatible with MySQL 8.0 protocols and tools, and it can be deployed on public clouds, on-premises, or on Kubernetes with TiDB Operator. A fully managed version is available as TiDB Cloud.

The project is written in Go and released under the Apache 2.0 license. It also supports vector search and changefeeds for data sync, and it provides data migration tools for moving existing application data into TiDB.

Key features

  • 01Distributed transactions with ACID guarantees using two-phase commit
  • 02Horizontal and vertical scaling with compute and storage separated
  • 03Raft-based replication with automated failover across replicas
  • 04HTAP via TiKV row storage and TiFlash columnar storage
  • 05MySQL 8.0 protocol and tool compatibility
  • 06Vector search and changefeeds for data sync

Use cases

  • Replacing a single-node MySQL deployment that has outgrown one server
  • Running transactional and analytical queries on the same live dataset
  • Building AI applications that need SQL storage plus vector search
  • Deploying a horizontally scalable database on Kubernetes

Quick start

  1. 1

    Start a local test cluster using the TiDB quick start guide

  2. 2

    Explore the TiDB SQL documentation

  3. 3

    Use a MySQL driver or an ORM to build an app with TiDB

Things to know

  • The README's main path is a managed cloud service or a Kubernetes deployment, so self-hosting a cluster takes significant setup effort.
  • TiDB is a distributed database with many components, so it is heavier to run than a single-node database.

Topics

FAQ

What is tidb?
Open-source distributed SQL database with MySQL 8.0 compatibility, ACID transactions, HTAP analytics, and vector search. TiDB is a cloud-native distributed SQL database designed for high availability, horizontal and vertical scaling, and strong consistency. It uses a two-phase commit protocol so transactions can span multiple nodes while keeping ACID guarantees. Data is replicated with the Raft consensus protocol, and transactions commit only after a majority of replicas have written them, which allows automated failover when some replicas fail.
Is tidb free to use? What license does it have?
tidb is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is tidb still maintained?
Actively maintained. The last commit to tidb was on Oct 21, 2026.
What can I use tidb for?
Replacing a single-node MySQL deployment that has outgrown one server Running transactional and analytical queries on the same live dataset Building AI applications that need SQL storage plus vector search Deploying a horizontally scalable database on Kubernetes
How do I install tidb?
Start a local test cluster using the TiDB quick start guide Explore the TiDB SQL documentation Use a MySQL driver or an ORM to build an app with TiDB
Where can I get tidb?
The source code and installation instructions are on GitHub: https://github.com/pingcap/tidb

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects