TiKV
activeby PingCAP / CNCF · since 2016
CNCF-graduated, Raft-replicated transactional key-value store in Rust; the storage layer of TiDB.
Overview
TiKV is a distributed key-value database that splits an ordered keyspace into Raft-replicated regions and offers both raw and Percolator-style distributed ACID transactions. PingCAP built it as the storage engine for TiDB and donated it to the CNCF, where it graduated in 2020; it can also be used standalone, for example as the backend for JuiceFS metadata or Redis-protocol layers. A Placement Driver handles timestamps, scheduling and rebalancing. It is a strong fit when you need a horizontally scalable, strongly consistent KV store and are comfortable running a multi-component cluster.
Strengths & trade-offs
Strengths
- +Distributed ACID transactions with snapshot isolation across regions of keyspace
- +Raft replication with automatic failover and rebalancing
- +Written in Rust on RocksDB, with years of production hardening under TiDB
- +Raw API for maximum throughput when transactions are not needed
- +MVCC enables stale and historical reads
Trade-offs
- −Needs Placement Driver and several TiKV nodes; heavy for small deployments
- −Timestamp oracle adds latency for globally distributed writes
- −Standalone (non-TiDB) client ecosystem is thinner than TiDB's
- −Tuning RocksDB and Raft parameters takes expertise
Great for
- +Storage layer for distributed SQL (TiDB)
- +Metadata for distributed file systems (JuiceFS)
- +Large-scale transactional key-value services
- +Redis-protocol or custom data layers needing strong consistency
Think twice for
- −Single-node or embedded use
- −Analytics without TiFlash/TiDB
- −Tiny datasets
Capabilities
Native or official first-party support · 7 of 25 tracked
Scale & consistency
- Comfortable data size
- Massive · Multi-PB
- Horizontal scaling
- Native
- Multi-region
- Read replicas
- Transactions
- Full ACID
- Consistency
- Strong
- Schema
- Schemaless
- Architecture
- Distributed, Client server
- Query languages
- TiKV API (Raw and Transactional)
Automatic region splitting and balancing via PD; multi-PB TiDB/TiKV clusters are documented. Placement rules and follower reads support cross-region layouts.
Deployment
Ecosystem
Alternatives to TiKV
Apple's ordered, strictly serializable distributed key-value store, built to have layers on top.
tikv vs foundationdb →Raft-based, strongly consistent key-value store that holds Kubernetes' cluster state.
tikv vs etcd →MySQL-compatible distributed SQL with a row store for OLTP and a columnar replica for real-time analytics.
tikv vs tidb →Postgres-wire distributed SQL built to survive node, zone and region failures with serializable transactions.
tikv vs cockroachdb →Masterless wide-column database built for always-on writes across data centers.
tikv vs apache-cassandra →Pure-Go LSM key-value store that separates keys from values to cut write amplification.
tikv vs badger →TiKV FAQ
What is TiKV?
TiKV is a key-value database by PingCAP / CNCF, first released in 2016. TiKV is a distributed key-value database that splits an ordered keyspace into Raft-replicated regions and offers both raw and Percolator-style distributed ACID transactions. PingCAP built it as the storage engine for TiDB and donated it to the CNCF, where it graduated in 2020; it can also be used standalone, for example as the backend for JuiceFS metadata or Redis-protocol layers. A Placement Driver handles timestamps, scheduling and rebalancing. It is a strong fit when you need a horizontally scalable, strongly consistent KV store and are comfortable running a multi-component cluster.
Is TiKV open source?
Yes. TiKV is open source. License: Apache License 2.0.
Does TiKV support ACID transactions?
Yes. TiKV supports full ACID transactions, with strong consistency.
Does TiKV scale horizontally?
TiKV scales horizontally out of the box, with built-in sharding or partitioning. It is comfortable at massive scale (Multi-PB). It supports cross-region read replicas.
How can I run TiKV?
You can self-host it.
What is TiKV best for?
TiKV is a strong fit for storage layer for distributed SQL (TiDB), metadata for distributed file systems (JuiceFS) and large-scale transactional key-value services. Think twice for single-node or embedded use.
What are the best alternatives to TiKV?
Common alternatives to TiKV include FoundationDB, etcd, TiDB, CockroachDB and Apache Cassandra. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.
How popular is TiKV?
TiKV ranks #148 of 844 databases on the WhichDB Score (20.8/100), and #18 among key-value databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.

