TiKV is a distributed key-value store with Raft replication and ACID transactions. It was created to complement TiDB and also backs other storage-oriented systems.
Overview
TiKV is an open-source distributed key-value database written in Rust. It exposes classical key-value APIs and transactional APIs with ACID semantics, using Raft for consensus and RocksDB for local storage on each store node.
A Placement Driver handles auto-sharding and data balancing across nodes organized into replicated regions. Transaction design draws on Percolator-style patterns with snapshot isolation, lock-aware reads, and externally consistent distributed writes. A coprocessor framework supports distributed computation similar in spirit to HBase-style designs.
Operators deploy single-node playgrounds with TiUP or binaries, multi-node test clusters via Docker Compose, or production-style clusters with TiUP or Kubernetes operators. Client drivers are available for languages such as Go and Python for verifying deployments.
TiKV is a graduated CNCF project and serves as storage for systems including TiDB, Redis-protocol layers, object metadata, recommendation features, and POSIX filesystem backends noted on the project site.
Key features
- Raft-replicated regions
- ACID distributed transactions
- Horizontal sharding with PD
- RawKV and transactional APIs
- RocksDB-backed stores
- Geo-replication support
- Coprocessor framework
- Docker Compose test clusters
Use cases
- TiDB storage layer
- Metadata for object stores
- Online recommendation storage
- Redis-protocol compatible layers
- Feature store backing data