TiDB
By PingCAP
TiDB is an open-source, distributed SQL database developed by PingCAP that is MySQL-compatible and designed for Hybrid Transactional/Analytical Processing (HTAP), letting the same cluster serve both transactional and analytical queries.
Definition
TiDB is an open-source, distributed SQL database developed by PingCAP that is MySQL-compatible and designed for Hybrid Transactional/Analytical Processing (HTAP), letting the same cluster serve both transactional and analytical queries.
Overview
TiDB separates a database into distinct layers so each can scale independently: a stateless SQL layer that speaks the MySQL wire protocol, a distributed transactional key-value storage layer (TiKV, built in Rust) that replicates data using the Raft consensus algorithm for strong consistency, and an optional columnar storage layer (TiFlash) that serves analytical queries without slowing down transactional workloads. Because the storage layer is distributed and horizontally scalable by design, TiDB can grow by adding more nodes rather than requiring the manual sharding schemes that traditional MySQL setups often need at large scale. Its MySQL compatibility means many existing applications, ORMs, and tools can connect to TiDB with little or no code change, easing migration from traditional MySQL deployments that have outgrown a single server. The HTAP design is TiDB's key differentiator: rather than running a separate data warehouse pipeline to analyze transactional data, TiFlash replicates data in a columnar format in near real time, so analytical queries (large aggregations, reporting) can run directly against fresh operational data. TiDB is often deployed on Kubernetes using its own operator, and is commonly compared to other distributed SQL systems like CockroachDB.
Key Features
- MySQL wire-protocol compatibility for easy migration and tooling reuse
- Distributed, horizontally scalable storage layer (TiKV) using the Raft consensus protocol
- Separate columnar storage layer (TiFlash) for real-time analytical queries
- Hybrid Transactional/Analytical Processing (HTAP) without separate ETL pipelines
- Strong consistency and distributed ACID transactions across nodes
- Horizontal scalability by adding nodes rather than manual sharding
- Kubernetes-native deployment via the TiDB Operator
- Available self-hosted or as a managed cloud service (TiDB Cloud)