All Projects → tikv → Tikv

tikv / Tikv

Licence: apache-2.0
Distributed transactional key-value database, originally created to complement TiDB

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Tikv

raft-rocks
A simple database based on raft and rocksdb
Stars: ✭ 38 (-99.63%)
Mutual labels:  rocksdb, key-value, raft, consensus
Tidb
TiDB is an open source distributed HTAP database compatible with the MySQL protocol
Stars: ✭ 29,871 (+187.14%)
Mutual labels:  hacktoberfest, distributed-transactions, tidb
Verdi Raft
An implementation of the Raft distributed consensus protocol, verified in Coq using the Verdi framework
Stars: ✭ 143 (-98.63%)
Mutual labels:  key-value, consensus, raft
Hraftd
A reference use of Hashicorp's Raft implementation
Stars: ✭ 732 (-92.96%)
Mutual labels:  key-value, consensus, raft
Zookeeper
Apache ZooKeeper
Stars: ✭ 10,061 (-3.29%)
Mutual labels:  hacktoberfest, key-value, consensus
raft-badger
Badger-based backend for Hashicorp's raft package
Stars: ✭ 27 (-99.74%)
Mutual labels:  key-value, raft, consensus
Etcd
Distributed reliable key-value store for the most critical data of a distributed system
Stars: ✭ 38,238 (+267.57%)
Mutual labels:  key-value, consensus, raft
sig-transaction
Resources for the transaction SIG
Stars: ✭ 59 (-99.43%)
Mutual labels:  distributed-transactions, tikv, tidb
Zanredisdb
Yet another distributed kvstore support redis data and index. moved to: https://github.com/youzan/ZanRedisDB
Stars: ✭ 64 (-99.38%)
Mutual labels:  key-value, rocksdb, raft
Elasticell
Elastic Key-Value Storage With Strong Consistency and Reliability
Stars: ✭ 453 (-95.65%)
Mutual labels:  key-value, raft
Async Raft
An implementation of the Raft distributed consensus protocol using the Tokio framework.
Stars: ✭ 510 (-95.1%)
Mutual labels:  consensus, raft
Copycat
A novel implementation of the Raft consensus algorithm
Stars: ✭ 551 (-94.7%)
Mutual labels:  consensus, raft
Ratis
Open source Java implementation for Raft consensus protocol.
Stars: ✭ 443 (-95.74%)
Mutual labels:  consensus, raft
Nuraft
C++ implementation of Raft core logic as a replication library
Stars: ✭ 428 (-95.89%)
Mutual labels:  consensus, raft
Docs
TiDB/TiKV/PD documentation.
Stars: ✭ 422 (-95.94%)
Mutual labels:  hacktoberfest, tidb
Cortex
A horizontally scalable, highly available, multi-tenant, long term Prometheus.
Stars: ✭ 4,491 (-56.83%)
Mutual labels:  hacktoberfest, cncf
Tidb Operator
TiDB operator creates and manages TiDB clusters running in Kubernetes.
Stars: ✭ 778 (-92.52%)
Mutual labels:  hacktoberfest, tidb
Kudo
Kubernetes Universal Declarative Operator (KUDO)
Stars: ✭ 849 (-91.84%)
Mutual labels:  hacktoberfest, cncf
Groupthink
A collaborative democratic platform built atop GitHub, designed for open policymaking and manifesto writing.
Stars: ✭ 28 (-99.73%)
Mutual labels:  hacktoberfest, consensus
Containerd
An open and reliable container runtime
Stars: ✭ 9,956 (-4.3%)
Mutual labels:  hacktoberfest, cncf

tikv_logo

Website | Documentation | Community Chat

Build Status Coverage Status CII Best Practices

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 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.

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 feedback here.

TiKV adopters

You can view the list of TiKV Adopters.

TiKV software stack

The TiKV software stack

  • Placement Driver: PD is the cluster manager of TiKV, which periodically checks replication constraints to balance load and data automatically.
  • Store: There is a RocksDB within each Store and it stores data into the local disk.
  • Region: Region is the basic unit of Key-Value data movement. Each Region is replicated to multiple Nodes. These multiple replicas form a Raft group.
  • Node: A physical node in the cluster. Within each node, there are one or more Stores. Within each Store, there are many Regions.

When a node starts, the metadata of the Node, Store and Region are recorded into PD. The status of each Region and Store is reported to PD regularly.

Quick start

Deploy a playground with TiUP

The most quickest to try out TiKV with TiDB is using TiUP, a component manager for TiDB.

You can see this page for a step by step tutorial.

Deploy a playground with binary

TiKV is able to run separatedly with PD, which is the minimal deployment required.

  1. Download and extract binaries.
$ export TIKV_VERSION=v4.0.12
$ 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
  1. Start PD instance.
$ ./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
  1. Start TiKV instance.
$ ./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
  1. Install TiKV Client(Python) and verify the deployment, required 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'

Deploy a cluster with TiUP

You can see this manual of production-like cluster deployment presented by @c4pt0r.

Build from source

See CONTRIBUTING.md.

Client drivers

Currently, the interfaces to TiKV are the TiDB Go client and the TiSpark Java client.

These are the clients for TiKV:

If you want to try the Go client, see Go Client.

Security

Security audit

A third-party security auditing was performed by Cure53. See the full report here.

Reporting Security Vulnerabilities

To report a security vulnerability, please send an email to TiKV-security group.

See Security for the process and policy followed by the TiKV project.

Communication

Communication within the TiKV community abides by TiKV Code of Conduct. Here is an excerpt:

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

Social Media

Slack

Join the TiKV community on Slack - Sign up and join channels on TiKV topics that interest you.

WeChat

The TiKV community is also available on WeChat. If you want to join our WeChat group, send a request mail to [email protected], with your personal information that includes the following:

  • WeChat ID (Required)
  • A contribution you've made to TiKV, such as a PR (Required)
  • Other basic information

We will invite you in right away.

License

TiKV is under the Apache 2.0 license. See the LICENSE file for details.

Acknowledgments

  • Thanks etcd for providing some great open source tools.
  • Thanks RocksDB for their powerful storage engines.
  • Thanks rust-clippy. We do love the great project.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].