Skip to main content

TiKV

TiKV is a distributed transactional key-value database (distributed data store) designed for horizontally scalable, strongly consistent storage that can serve as a storage engine or standalone system.

  • Distributed transactional key-value store with row-based key space (database / distributed storage).
  • Support for ACID transactions with distributed transaction protocol and Percolator-inspired model (transaction processing).
  • Replication and automatic failover using Multi-Raft consensus groups (data reliability / high availability).
  • Horizontal scalability through automatic sharding and rebalancing of data regions (scalability / capacity management).
  • Compatibility as the storage layer for TiDB and as a standalone KV Application Programming Interface (API) for other systems (data infrastructure / platform integration).

More About Tikv

TiKV is an open-source distributed transactional key-value database (distributed storage) under the Cloud Native Computing Foundation (CNCF), designed to provide horizontally scalable, strongly consistent storage for online transactional workloads. It targets use cases where applications require linearizable semantics, ACID transactions, and low-latency access over large datasets that are distributed across clusters of commodity servers.

At its core, TiKV organizes data as a sorted, row-based key-value store (database / key-value storage). The key space is lexicographically ordered and partitioned into ranges called regions, which are automatically split and moved across nodes as data volume and access patterns change (data partitioning / sharding). This model allows TiKV to scale horizontally by adding more nodes while maintaining a unified logical key space.

For consistency and fault tolerance, TiKV uses the Raft consensus algorithm in a multi-raft setup (data replication / consensus). Each region is replicated as a Raft group across multiple nodes, providing automatic leader election, log replication, and recovery from node failures. This replication model underpins high availability characteristics and supports automatic failover when individual nodes or processes become unavailable.

TiKV implements distributed ACID transactions (transaction processing) using a model inspired by the Percolator transaction protocol. It supports features such as Two-Phase Commit (2PC), optimistic concurrency control, and snapshot isolation (data consistency). These capabilities enable application developers or higher-level database engines to execute transactional operations across keys and regions while preserving correctness under concurrent workloads.

The project is frequently deployed as the storage engine for TiDB, a MySQL-compatible distributed Structured Query Language (SQL) database (database platform integration). In this architecture, TiDB nodes provide the SQL layer, query planning, and execution, while TiKV nodes manage data persistence, replication, and transaction processing. The separation of compute and storage allows independent scaling and operational control at each layer.

TiKV exposes APIs for interacting directly with the key-value layer (developer platform / data services). This enables other systems, services, or middleware to build custom data management solutions on top of TiKV without going through a SQL abstraction. The ecosystem also includes components such as the Placement Driver (cluster metadata / scheduling), which coordinates region placement, load balancing, and cluster-level management tasks.

From an enterprise perspective, TiKV occupies the category of distributed transactional key-value databases and storage engines for cloud-native environments. It is suited for deployments where strong consistency, horizontal scalability, and automatic fault tolerance are required, including deployments on physical infrastructure, virtualized environments, or Kubernetes-based platforms that align with CNCF practices.