tidb README

The project's README from github.com/pingcap/tidb. As one markdown file: README.md.

TiDB, a distributed SQL database

License Language

Build Status Go Report Card GitHub release

TiDB

TiDB (/’taɪdiːbi:/, "Ti" stands for Titanium) is an open-source, cloud-native, distributed SQL database designed for high availability, horizontal and vertical scalability, strong consistency, and high performance.

Key Features

Quick Start

  1. Start a TiDB cluster.

    • On local playground. To start a local test cluster, refer to the TiDB quick start guide.

    • On Kubernetes. TiDB can be easily deployed in a self-managed Kubernetes environment or Kubernetes services on public clouds using TiDB Operator. For more details, refer to the TiDB on Kubernetes quick start guide.

    • Using TiDB Cloud (recommended). TiDB Cloud offers a fully managed version of TiDB with a free plan, no credit card required, so you can get a free cluster in seconds and start easily: Sign up for TiDB Cloud.

  2. Learn about TiDB SQL: To explore the SQL capabilities of TiDB, refer to the TiDB SQL documentation.

  3. Use a MySQL driver or an ORM to Build an App with TiDB.

  4. Explore key features, such as data migration, changefeed, vector search, HTAP, disaster recovery, etc.

Need Help?

Architecture

TiDB architecture

Learn more details about TiDB architecture in our Docs.

Contributing

TiDB is built on a commitment to open source, and we welcome contributions from everyone. Whether you are interested in improving documentation, fixing bugs, or developing new features, we invite you to shape the future of TiDB.

Active Contributors of pingcap/tidb - Last 28 days

License

TiDB is under the Apache 2.0 license. See the LICENSE file for details.

See Also

Acknowledgments

tidb (pingcap/tidb)

tidb
Searching Database…

40.6K ·GitHub
What is this?TiDB is an open-source, cloud-native distributed SQL database written in Go — MySQL-compatible and built for high availability, horizontal scalability, strong consistency, and mixing transactions with analytics.
Is it a single database process or a cluster of components?A distributed cluster: the TiDB server handles SQL, TiKV stores row data, and TiFlash keeps a columnar copy for analytics. Compute and storage are separated, so you scale each independently without downtime.
What's the fastest way to get a cluster running?Sign up for TiDB Cloud — a free managed cluster in seconds, no credit card. For self-hosting, run the local playground for testing or deploy to Kubernetes with TiDB Operator.
My app is already on MySQL — how much work to move it over?Usually very little: TiDB is compatible with MySQL 8.0, so existing drivers, frameworks, and tools connect as-is, and a suite of migration tools moves the data. Most apps need no or minimal code changes.
Where does TiDB actually run — do I need Kubernetes to use it?No — it deploys in public clouds, on-premises, or natively in Kubernetes, where TiDB Operator automates cluster operations. There is also a local playground for testing and the managed TiDB Cloud.
Is it fully open source, or is part of it paid?The database is fully open source under Apache 2.0 — all code is on GitHub, including enterprise-grade features. The paid option is TiDB Cloud, the optional managed service, which also has a free plan.
Can I run analytics on the same live data as my transactions?Yes — that is the HTAP part: TiFlash is a columnar replica fed from TiKV in real time over the Multi-Raft Learner protocol, so analytics run on consistent live data instead of a separate ETL copy.
What happens if a node dies in the middle of a write?TiDB keeps multiple replicas under the Raft consensus protocol and commits a transaction only after a majority of replicas have it, so data survives failures. Failover is automatic, and replica placement can be tuned geographically for disaster tolerance.
Does it have anything built in for AI agents?Yes — vector search ships as a key feature, and the project is pitched at agentic workloads that grow unpredictably. Since it speaks the MySQL protocol, agents connect with standard drivers and ORMs.
Why pick it over plain MySQL, since it is MySQL-compatible anyway?Plain MySQL does not scale out horizontally without downtime or run columnar analytics on live transactional data. TiDB adds two-phase-commit ACID transactions across nodes, Raft-replicated storage, and the TiFlash columnar engine behind MySQL-compatible SQL.
What are similar projects?oceanbase, vitess, tikv, dgraph, neon, ClickHouse, starrocks, minio
Creator
pingcap
Size
797.3 MB
Stars
40.6K
Age
11y
Commits · 90 Days