# TiDB

An open-source, cloud-native distributed SQL database with MySQL compatibility, built for high availability, horizontal and vertical scalability, and hybrid transactional and analytical workloads.

TiDB uses a two-phase commit protocol for distributed ACID transactions across multiple nodes, and a built-in Raft consensus protocol replicates data across nodes for automated failover; a transaction commits once a majority of replicas confirm it, and replica placement can be configured for different disaster-tolerance levels. Compute and storage are separated so each can be scaled independently, horizontally or vertically, without downtime.

It provides two storage engines: TiKV, a row-based store, and TiFlash, a columnar store kept in sync with TiKV in real time through a Multi-Raft Learner protocol, so TiDB can run hybrid transactional and analytical (HTAP) queries across both. It is compatible with MySQL 8.0, letting existing applications and tools connect with little or no code change, and it can be deployed on-premises, in Kubernetes with TiDB Operator, or as a managed service on TiDB Cloud.

It is written in Go and licensed under Apache-2.0.

Website: https://www.tidb.io/
