Book a Demo Start Instantly

High Availability in TiDB

TiDB uses Raft protocol to create a high availability environment, ensuring that your data is always accessible. Even with high availability, it maintains consistency of data across all nodes and delivers continuous access.

Standard Raft uses a Leader and Follower approach to maintain availability. If the Leader fails, a Follower is automatically put forth to be designated as the new Leader. The Leader is then responsible for validating data consistency across nodes. In TiDB, an additional designation of Learner is included into Raft. A Learner node is like a Follower, but it can never be put up for election as a Leader. Since the initial write to the database is always done to a node running TiKV as opposed to TiFlash, designating TiFlash nodes as Leaners prevents them from ever being promoted to a Leader role.

TiDB high availability provides

  • Continuous data access
  • Automatic recovery of a failed node
  • Assured data consistency across all nodes

TiDB delivers a high availability environment along with data consistency to provide ongoing, reliable, accurate data access.

Case Study

Goodbye, MySQL Sharding: Use a Scale-Out MySQL Alternative to Store 160+ TB of Data

This post talks about how TiDB, a highly available MySQL alternative, helps avoid MySQL sharding, scale out their databases, and simplify their database maintenance.

TiDB Dedicated

TiDB Dedicated

A fully-managed cloud DBaaS for predictable workloads

TiDB Dedicated

TiDB Serverless

A fully-managed cloud DBaaS for auto-scaling workloads


Access tutorials, guides, release notes, and more

View Docs

Join our community to connect with TiDB contributors from around the world


Check out TiDB and TiDB Cloud Frequently Asked Questions