tikv /tikv

Distributed transactional key-value database, originally created to complement TiDB

★ 16,941⑂ 2,376
RustCreated 2015-12-31tikv.org
16,941
stars
+5+7+40
2,376
forks
–
watchers
–
prs
–
issues
–
releases
–
discussions

README

Website | Documentation | Community Chat





TiKV is an open-source, distributed, and transactional key-value database. Unlike other traditional NoSQL systems, TiKV not only provides classical key-value APIs, but also transactional APIs with ACID compliance. Built in Rust and powered by Raft, TiKV was originally created by PingCAP to complement TiDB, a distributed HTAP database compatible with the MySQL protocol.

The design of TiKV ('Ti' stands for titanium) is inspired by some great distributed systems from Google, such as BigTable, Spanner, and Percolator, and some of the latest achievements in academia in recent years, such as the Raft consensus algorithm.

If you're interested in contributing to TiKV, or want to build it from source,
see CONTRIBUTING.md. For maintainership-oriented code
reading and review context, see
doc/maintenance-guides/README.md.

!cncf_logo
!cncf_logo

TiKV is a graduated project of the Cloud Native Computing Foundation (CNCF). If you are an organization that wants to help shape the evolution of technologies that are container-packaged, dynamically-scheduled and microservices-oriented, consider joining the CNCF. For details about who's involved and how TiKV plays a role, read the CNCF announcement.

---

With the implementation of the Raft consensus algorithm in Rust and consensus state stored in RocksDB, TiKV guarantees data consistency. Placement Driver (PD), which is introduced to implement auto-sharding, enables automatic data migration. The transaction model is similar to Google's Percolator with some performance improvements. TiKV also provides snapshot isolation (SI), snapshot isolation with lock (SQL: SELECT ... FOR UPDATE), and externally consistent reads and writes in distributed transactions.

TiKV has the following key features:

- Geo-Replication

    TiKV uses Raft and the Placement Driver to support Geo-Replication.

- Horizontal scalability

    With PD and carefully designed Raft groups, TiKV excels in horizontal scalability and can easily scale to 100+ TBs of data.

- Consistent distributed transactions

    Similar to Google's Spanner, TiKV supports externally-consistent distributed transactions.

- Coprocessor support

    Similar to HBase, TiKV implements a coprocessor framework to support distributed computing.

- Cooperates with TiDB

    Thanks to the internal optimization, TiKV and TiDB can work together to be a compelling database solution with high horizontal scalability, externally-consistent transactions, support for RDBMS, and NoSQL design patterns.

 Governance

See Governance.

 Documentation

For instructions on deployment, configuration, and maintenance of TiKV,see TiKV documentation on our website. For more details on concepts and designs behind TiKV, see Deep Dive TiKV.

 Note:

 We have migrated our documentation from the TiKV's wiki page to the official website. The original Wiki page is discontinued. If you have any suggestions or issues regarding documentation, offer your feedba

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON