
TiDB
MySQL-compatible distributed SQL database for elastic scale
Replaces Cockroachdb, Google Cloud Spanner, Amazon Aurora

Who it's for
Use TiDB when transactional data needs to scale horizontally without a full application rewrite.
Your database fits comfortably on one managed PostgreSQL or MySQL instance.
Run operational queries and analytical workloads closer together when a separate warehouse adds too much latency or complexity.
You only need a managed warehouse for offline analytics.
The problem
Traditional single-node databases become hard to scale when data growth, regional availability, and analytics pressure arrive at the same time. Teams either shard manually, split transactional and analytical systems, or buy a managed distributed database that limits infrastructure control.
How it works
TiDB uses distributed transaction protocols to keep SQL consistency across nodes, making it suitable for workloads that outgrow one primary database server.
The architecture separates compute and storage, so teams can add nodes or resize resources as traffic grows.
TiDB targets both transactional and analytical workloads while preserving a MySQL-compatible SQL surface for many applications.
Features
- Distributed SQL with ACID transactions
- Horizontal scale without downtime
- HTAP and MySQL compatibility
How to install
```bash curl --proto =https --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh && tiup playground ```
Recommended for this setup
Strengths
- MySQL-compatible distributed scale: TiDB is attractive when teams want distributed SQL behavior without abandoning the MySQL ecosystem.
- One platform for transactions and analytics: HTAP positioning helps teams avoid immediately splitting operational and analytical data into separate systems.
Trade-offs
- Operationally more complex than managed databases: Running TiDB means understanding placement, storage, PD, TiKV, upgrades, and observability.
- Not needed for ordinary app databases: A standard PostgreSQL or MySQL deployment is simpler if the workload does not require distributed scale.
Tech stack
FAQ
TiDB provides a MySQL-compatible SQL interface, which helps teams migrate applications that already use MySQL patterns.
TiDB can replace Aurora when distributed SQL, self-hosting, or HTAP behavior matter more than AWS-managed convenience. Aurora is simpler for managed relational workloads inside AWS.
TiKV is the distributed key-value storage layer used by TiDB. It works with TiDB and placement driver components to provide distributed storage and coordination.