What is TiDB?

TiDB (pronounced "/ˈtaɪdiːbiː./", "Ti" stands for Titanium) is an open-source, distributed SQL database that supports Hybrid Transactional and Analytical Processing (HTAP) workloads. It is MySQL compatible, horizontally scalable, and designed for applications that require strong consistency and high availability at scale. TiDB is built by PingCAP, licensed under Apache 2.0, and its storage engine TiKV is a graduated project of the Cloud Native Computing Foundation (CNCF).

How TiDB Works

TiDB separates compute from storage, which means you can scale each layer independently based on your workload. The architecture has four core components:

TiDB architecture diagram showing PD cluster, TiDB cluster, and storage cluster with TiKV and TiFlash nodes

1
TiDB Server

TiDB Server is the stateless SQL layer. It parses queries, optimizes execution plans, and coordinates reads and writes across the storage layer. Because it’s stateless, you can add or remove TiDB Server instances without touching your data.

2
PD (Placement Driver)

PD (Placement Driver) manages cluster metadata, handles timestamp allocation for transactions, and makes scheduling decisions, like where to place data replicas and how to balance load across nodes.

3
TiKV

TiKV is a distributed, row-based key-value store that handles transactional (OLTP) workloads. Data is automatically split into regions and replicated across nodes using a consensus protocol, which ensures strong consistency and automatic failover if a node goes down.

4
TiFlash

TiFlash is a columnar storage engine that replicates data from TiKV in real time. It handles analytical (OLAP) queries without impacting transactional performance. This is what makes TiDB an HTAP database. You run analytics directly on live transactional data, with no ETL pipeline required.

The result is a system where you can scale your SQL compute independently from your storage, run transactional and analytical workloads on the same data simultaneously, and maintain strong consistency across the entire cluster. For a full technical deep dive, see the TiDB architecture documentation.

Key Capabilities

TiDB combines the familiarity of MySQL with the scalability of a distributed system. These are the core capabilities that make that possible.

MySQL Compatibility

TiDB implements the MySQL wire protocol and is compatible with MySQL syntax, functions, and ecosystem tooling. Most applications built on MySQL can connect to TiDB with zero code changes. Same connection strings, same ORMs, same drivers. For teams already running MySQL, this means you can migrate to a distributed database without rewriting your application layer or retraining your developers. TiDB also provides a suite of data migration tools to simplify the transition.

scalability

Horizontal Scalability

When your workload grows, you add nodes. TiDB scales horizontally by distributing data and queries across commodity hardware, with no manual sharding required. Because compute and storage are decoupled, you can scale each layer independently: add TiDB Server nodes to handle more concurrent connections, or add TiKV/TiFlash nodes to expand storage capacity. Scaling happens online with zero downtime.

Real-Time Analytics (HTAP)

Most databases force you to choose between transactions and analytics. TiDB handles both. TiKV serves your OLTP workload while TiFlash runs OLAP queries on the same data in real time. There’s no ETL pipeline to build, no replica lag to worry about, and no separate analytics database to maintain. Your application writes to TiDB once, and both operational queries and analytical dashboards read from the same source of truth.

Cloud-Native Deployment

TiDB was designed for cloud infrastructure from the start. It runs natively on Kubernetes using TiDB Operator, which automates deployment, scaling, upgrades, and failover. You can self-manage TiDB on any Kubernetes-compatible environment, or use TiDB Cloud, PingCAP’s fully managed Database-as-a-Service available on AWS, Google Cloud, and Azure.

Strong Consistency and High Availability

TiDB provides full ACID transactions across distributed nodes. Every piece of data is replicated to multiple nodes, and transactions are committed only when a majority of replicas acknowledge the write. If a node fails, the cluster automatically redistributes its workload with no manual intervention. You get the consistency guarantees of a traditional relational database with the fault tolerance of a distributed system.

Common Use Cases

From financial infrastructure to AI agent platforms, TiDB powers production workloads across industries where scale, consistency, and uptime are non-negotiable.

Financial Services

Banks, payment processors, and fintech platforms use TiDB for workloads where data consistency, high availability, and disaster tolerance are non-negotiable. TiDB’s multi-replica architecture and ACID guarantees meet the requirements of ledger systems, fraud detection, and regulatory, while scaling to handle transaction volumes that overwhelm single-node databases.

Learn more about TiDB for financial services

SaaS and Internet-Scale Applications

TiDB powers production workloads at companies like Atlassian, Plaid, and Databricks. For SaaS platforms and internet-scale applications, TiDB eliminates the sharding complexity and operational overhead that come with outgrowing a single MySQL or PostgreSQL instance. You scale by adding nodes, not by rewriting your data access layer.

Explore customer stories

Real-Time Analytics and Operational Reporting

Teams that need real-time dashboards, cohort analysis, or operational reporting on transactional data can run those queries directly in TiDB using TiFlash. There’s no need to build and maintain a separate ETL pipeline into an analytics warehouse. One database, one source of truth, both workloads.

AI Applications

TiDB supports native vector search, enabling developers to build retrieval-augmented generation (RAG) pipelines and agent memory systems without bolting on a separate vector database. AI-native companies like Manus and Dify use TiDB as a unified data layer, combining structured data, semantic vectors, and full-text search in a single query layer for a simpler stack.

Who Uses TiDB

From financial infrastructure to AI agent platforms, TiDB powers production workloads across industries where scale, consistency, and uptime are non-negotiable.

Manus
Plaid
Dify
Pinterest
Square
Flipkart
Bolt
conga
Catalyst
Rakuten
manus

“TiDB’s elastic architecture enabled us to migrate in two weeks, supporting users and massive ‘Context Engineering’ workloads for viral success.”

Manus engineering team

Migrated to TiDB Cloud in two weeks to support the viral launch of their general-purpose agentic AI platform. After amassing a two-million-plus waitlist within weeks of launch, Manus needed extreme write throughput and low-latency state reconstruction for thousands of stateful agent iterations per task. Those are workloads a monolithic database couldn’t sustain. TiDB now powers Manus’s “Wide Research” agent swarms, with over 90% of new database clusters created by AI agents, not humans.

Atlassian

“TiDB came to our rescue, consolidating 750 Postgres clusters down to 16 with zero performance degradation.”

Atlassian engineering team

Consolidated 750+ PostgreSQL clusters into 16 TiDB clusters to power the Forge plugin platform. Atlassian’s one-schema-per-tenant SaaS model required hosting over 3 million tables in a single system, something traditional single-node databases couldn’t handle. TiDB delivered 6-7x DDL throughput improvement, validated 500,000 concurrent active connections per cluster, and cut node initialization time from 20 minutes to 2 minutes.

Dify

“We consolidated our entire AI backend into TiDB, letting our engineers focus on building agent features instead of managing database complexity.”

Dify engineering team

Consolidated nearly half a million database containers into one unified TiDB system, cutting operational overhead by 90%. Dify, the second most popular LLM development tool on GitHub with 70,000+ stars, needed a single data layer that could handle documents, vectors, chat histories, and relational data for thousands of developers building AI applications. TiDB’s native vector search enabled built-in RAG workflows without a separate vector database.

PLAID

“With TiDB, we can now perform upgrades with zero downtime and large table schema migrations.”

Zander Hill | Experienced Data Reliability Engineer

Reduced database maintenance effort by 96% with zero downtime upgrades after migrating from Amazon Aurora to TiDB. A team of six engineers migrated nearly 100 services in under two years. Where Aurora upgrades once consumed 26 engineering weeks and 104 minutes of planned downtime, equivalent TiDB upgrades now take one engineering week with zero downtime.

Analyst and Peer Recognition

From financial infrastructure to AI agent platforms, TiDB powers production workloads across industries where scale, consistency, and uptime are non-negotiable.

G2: Leader in Three Categories

TiDB earned a leader position in G2’s Summer 2025 Grid reports across three categories: Database-as-a-Service, Database Management Systems, and Relational Databases. G2 placements are based on verified customer reviews evaluating satisfaction and market presence.
G2 Leader Winter 2025

“TiDB shines when you want MySQL-like simplicity with cloud-scale architecture.”

Verified G2 reviewer

Gartner Peer Insights

TiDB has 165+ reviews on Gartner Peer Insights, with reviewers highlighting MySQL compatibility, horizontal scalability, and operational simplicity as standout strengths.
Gartner Peer Insights

“MySQL compatibility makes using TiDB extremely easy. Having both row storage and column storage while using the same datasource is a great feature.”

Verified Gartner Peer Insights reviewer

Open Source Community

TiDB has over 39,900 GitHub stars and more than 1,200 contributors worldwide. Its storage engine, TiKV, is a CNCF Graduated project, the highest maturity level in the Cloud Native Computing Foundation, alongside projects like Kubernetes and Prometheus.
Cloud Native Computing Foundation
GitHub stars
39.9K
GitHub stars
Contributors
1200+
Contributors

TiDB vs. Traditional Databases

If you’re running MySQL or PostgreSQL today, you already know the pattern. Your application grows, your data grows, and eventually a single database server can’t keep up. The conventional playbook (read replicas, manual sharding, a separate analytics warehouse connected by ETL pipelines) adds layers of complexity that compound over time. Every new shard means new routing logic in your application. Every analytics query runs on data that’s at least minutes old. Every failover event is a manual scramble.

TiDB eliminates these layers. Because it’s a distributed SQL database with MySQL wire-protocol compatibility, you keep writing standard SQL against a MySQL-compatible interface. But behind that interface, TiDB distributes your data automatically, scales horizontally without sharding, runs real-time analytics on live transactional data, and fails over automatically with no data loss. You don’t migrate to a different paradigm. You migrate to a better architecture for the same paradigm.

Want to Talk to An Expert?

Book a meeting to discuss your specific use case with our solutions engineering team.

TiDB Frequently Asked Questions

TiDB is an open-source, distributed SQL database built by PingCAP. It supports Hybrid Transactional and Analytical Processing (HTAP) workloads, is compatible with the MySQL protocol, and scales horizontally across commodity hardware. TiDB is licensed under Apache 2.0, and its storage layer TiKV is a CNCF Graduated project.