TiDB is an open-source, cloud-native distributed SQL database written in Go that provides ACID guarantees with native support for transactions, analytics, and vector search. The project is designed to handle agentic workloads that grow unpredictably while maintaining strong consistency and high performance across horizontally and vertically scalable infrastructure.
The core architecture separates computing from storage, enabling independent scaling of both layers without downtime. TiDB uses a two-phase commit protocol to ensure ACID compliance across distributed transactions spanning multiple nodes, maintaining data correctness even during network partitions or node failures. The system employs a built-in Raft consensus protocol for reliability, with data stored in multiple replicas and transactions committed only after writing to the majority, guaranteeing strong consistency and availability.
TiDB implements hybrid transactional and analytical processing through two storage engines: TiKV, a row-based engine, and TiFlash, a columnar engine. TiFlash uses the Multi-Raft Learner protocol to replicate data from TiKV in real time, ensuring consistent data between both engines. The TiDB Server coordinates query execution across both storage engines to optimize performance for different workload patterns.
MySQL 8.0 compatibility is a central design principle, allowing applications to migrate to TiDB with minimal or no code changes. The project provides data migration tools to facilitate moving application data into TiDB. Cloud-native deployment is supported across public clouds, on-premises environments, and Kubernetes, with TiDB Operator automating cluster operations on Kubernetes and TiDB Cloud offering a fully managed service.
TiDB is released under the Apache 2.0 license with all source code available on GitHub, including enterprise-grade features. The project actively encourages community contributions through good first issues, help wanted labels, and a contribution map detailing contribution opportunities. Community support is provided through Discord, Slack channels in English and Japanese, Stack Overflow, and regional forums including the TiDB Chinese Forum.