openskills.info
TiKV logoCourse Preview

TiKV

TiKV is a distributed key-value database that splits ordered keys across a cluster and replicates each range. It gives applications a durable storage layer with raw key-value access or distributed transactions.

itCloud native tools and technologies

TiKV

TiKV is a distributed key-value database. You store bytes under ordered keys, while TiKV spreads the key space across machines and keeps replicas of each part.

That sounds like a simple map with extra machinery. The machinery solves hard problems. It decides where a key lives, keeps copies consistent, moves data as the cluster changes, and coordinates transactions across key ranges.

The mental model

Picture one sorted key space cut into consecutive ranges. TiKV calls each range a Region. Each Region has several replicas, called peers, and those peers form a Raft group.

One peer is the leader. A write goes through that leader and becomes a Raft log entry. The group commits the entry after a majority accepts it. RocksDB stores the resulting data on each TiKV store.

Continue the course

This section is part of the paid course.

See pricing to subscribe, or log in if you already have access.

Sources