Data systems

tikv/

tikv

Distributed, ACID-compliant key-value store built on Raft and RocksDB, designed to scale to 100+ TB with geo-replication.

What’s new here

TiKV offers both a raw KV API and a transactional API with full ACID guarantees. The transaction model follows Google Percolator with optimizations, and consistency is enforced through Raft consensus per region group. You get snapshot isolation and externally consistent distributed transactions from the same store.

What it does

TiKV stores data in RocksDB instances spread across nodes. A Placement Driver (PD) cluster manages sharding, replication constraints, and automatic data migration. Data is split into Regions, each replicated across a Raft group. This gives you:

  • Geo-replication through Raft and PD
  • Horizontal scaling to 100+ TB by adding nodes
  • ACID transactions with snapshot isolation and SELECT ... FOR UPDATE semantics
  • A coprocessor framework for distributed computation close to the data
  • Client drivers in Go, Java, Rust, and C

TiKV was created to complement TiDB (a distributed HTAP database compatible with the MySQL protocol), but it also runs as a standalone store with PD.

Who it’s for

Teams that need a horizontally scalable, strongly consistent key-value store and want ACID transactions. It fits well as a backend for applications that have outgrown single-node databases and need geo-replication. It is a CNCF graduated project, so operators comfortable with cloud-native tooling will find familiar patterns.

Try it

A minimal local setup downloads pre-built binaries and starts PD plus one TiKV node (the README also offers a TiUP playground that includes TiDB):

$ export TIKV_VERSION=v7.5.0
$ export GOOS=darwin  # only {darwin, linux} are supported
$ export GOARCH=amd64 # only {amd64, arm64} are supported
$ curl -O  https://tiup-mirrors.pingcap.com/tikv-$TIKV_VERSION-$GOOS-$GOARCH.tar.gz
$ curl -O  https://tiup-mirrors.pingcap.com/pd-$TIKV_VERSION-$GOOS-$GOARCH.tar.gz
$ tar -xzf tikv-$TIKV_VERSION-$GOOS-$GOARCH.tar.gz
$ tar -xzf pd-$TIKV_VERSION-$GOOS-$GOARCH.tar.gz
$ ./pd-server --name=pd --data-dir=/tmp/pd/data --client-urls="http://127.0.0.1:2379" --peer-urls="http://127.0.0.1:2380" --initial-cluster="pd=http://127.0.0.1:2380" --log-file=/tmp/pd/log/pd.log
$ ./tikv-server --pd-endpoints="127.0.0.1:2379" --addr="127.0.0.1:20160" --data-dir=/tmp/tikv/data --log-file=/tmp/tikv/log/tikv.log

For a full three-PD, three-TiKV cluster, use Docker Compose from a checkout of the repo (on macOS, use docker compose):

$ docker-compose up -d

Verify with the Python client (requires Python 3.5+):

$ pip3 install -i https://test.pypi.org/simple/ tikv-client
from tikv_client import RawClient
 
client = RawClient.connect(["127.0.0.1:2379"])
 
client.put(b'foo', b'bar')
print(client.get(b'foo')) # b'bar'
 
client.put(b'foo', b'baz')
print(client.get(b'foo')) # b'baz'

How mature is it

TiKV has been active since December 2015 and graduated from the CNCF in September 2020. The repo shows 16,907 stars, 2,359 forks, and at least 100 contributors and 100 releases. GitHub’s latest release is v7.5.8, tagged September 17, 2026; the newest release line is 8.5, at v8.5.8 (August 27, 2026). There were 70 commits in the 90 days before the data snapshot, indicating steady maintenance. License is Apache-2.0. A third-party security audit by Cure53 is included in the repository.