{"id":13414609,"url":"https://github.com/tikv/tikv","last_synced_at":"2025-05-13T17:04:07.718Z","repository":{"id":37254112,"uuid":"48833910","full_name":"tikv/tikv","owner":"tikv","description":"Distributed transactional key-value database, originally created to complement TiDB","archived":false,"fork":false,"pushed_at":"2025-05-02T13:35:48.000Z","size":121337,"stargazers_count":15791,"open_issues_count":1536,"forks_count":2181,"subscribers_count":301,"default_branch":"master","last_synced_at":"2025-05-06T16:12:27.159Z","etag":null,"topics":["cncf","consensus","distributed-transactions","hacktoberfest","key-value","raft","rocksdb","rust","tidb","tikv"],"latest_commit_sha":null,"homepage":"https://tikv.org","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tikv.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-12-31T04:51:32.000Z","updated_at":"2025-05-06T15:57:15.000Z","dependencies_parsed_at":"2024-01-02T08:41:59.013Z","dependency_job_id":"25fffcbf-3cfe-4c4c-a8db-16872cf06094","html_url":"https://github.com/tikv/tikv","commit_stats":{"total_commits":7414,"total_committers":470,"mean_commits":"15.774468085106383","dds":0.9312112220124089,"last_synced_commit":"44356c16acc47bf4f5cee733b5153cdeec3fff80"},"previous_names":["pingcap/tikv"],"tags_count":282,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tikv%2Ftikv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tikv%2Ftikv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tikv%2Ftikv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tikv%2Ftikv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tikv","download_url":"https://codeload.github.com/tikv/tikv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990453,"owners_count":21995773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cncf","consensus","distributed-transactions","hacktoberfest","key-value","raft","rocksdb","rust","tidb","tikv"],"created_at":"2024-07-30T21:00:30.267Z","updated_at":"2025-05-13T17:04:07.694Z","avatar_url":"https://github.com/tikv.png","language":"Rust","readme":"\u003cimg src=\"images/tikv-logo.png\" alt=\"tikv_logo\" width=\"300\"/\u003e\n\n## [Website](https://tikv.org) | [Documentation](https://tikv.org/docs/latest/concepts/overview/) | [Community Chat](https://slack.tidb.io/invite?team=tikv-wg\u0026channel=general)\n\n[![Build Status](https://ci.pingcap.net/buildStatus/icon?job=tikv_ghpr_build_master)](https://ci.pingcap.net/blue/organizations/jenkins/tikv_ghpr_build_master/activity)\n[![Coverage Status](https://codecov.io/gh/tikv/tikv/branch/master/graph/badge.svg)](https://codecov.io/gh/tikv/tikv)\n[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2574/badge)](https://bestpractices.coreinfrastructure.org/projects/2574)\n\nTiKV 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](https://en.pingcap.com) to complement [TiDB](https://github.com/pingcap/tidb), a distributed HTAP database compatible with the MySQL protocol.\n\nThe 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.\n\nIf you're interested in contributing to TiKV, or want to build it from source, see [CONTRIBUTING.md](./CONTRIBUTING.md).\n\n![cncf_logo](images/cncf.png#gh-light-mode-only)\n![cncf_logo](images/cncf-white.png#gh-dark-mode-only)\n\nTiKV is a graduated project of the [Cloud Native Computing Foundation](https://cncf.io/) (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](https://www.cncf.io/announcements/2020/09/02/cloud-native-computing-foundation-announces-tikv-graduation/).\n\n---\n\nWith the implementation of the Raft consensus algorithm in Rust and consensus state stored in RocksDB, TiKV guarantees data consistency. [Placement Driver (PD)](https://github.com/pingcap/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.\n\nTiKV has the following key features:\n\n- **Geo-Replication**\n\n    TiKV uses [Raft](http://raft.github.io/) and the Placement Driver to support Geo-Replication.\n\n- **Horizontal scalability**\n\n    With PD and carefully designed Raft groups, TiKV excels in horizontal scalability and can easily scale to 100+ TBs of data.\n\n- **Consistent distributed transactions**\n\n    Similar to Google's Spanner, TiKV supports externally-consistent distributed transactions.\n\n- **Coprocessor support**\n\n    Similar to HBase, TiKV implements a coprocessor framework to support distributed computing.\n\n- **Cooperates with [TiDB](https://github.com/pingcap/tidb)**\n\n    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.\n\n## Governance\n\nSee [Governance](https://github.com/tikv/community/blob/master/GOVERNANCE.md).\n\n## Documentation\n\nFor instructions on deployment, configuration, and maintenance of TiKV,see TiKV documentation on our [website](https://tikv.org/docs/4.0/tasks/introduction/). For more details on concepts and designs behind TiKV, see [Deep Dive TiKV](https://tikv.org/deep-dive/introduction/).\n\n\u003e **Note:**\n\u003e\n\u003e We have migrated our documentation from the [TiKV's wiki page](https://github.com/tikv/tikv/wiki/) to the [official website](https://tikv.org/docs). The original Wiki page is discontinued. If you have any suggestions or issues regarding documentation, offer your feedback [here](https://github.com/tikv/website).\n\n## TiKV adopters\n\nYou can view the list of [TiKV Adopters](https://tikv.org/adopters/).\n\n## TiKV software stack\n\n![The TiKV software stack](images/tikv_stack.png)\n\n- **Placement Driver:** PD is the cluster manager of TiKV, which periodically checks replication constraints to balance load and data automatically.\n- **Store:** There is a RocksDB within each Store and it stores data into the local disk.\n- **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.\n- **Node:** A physical node in the cluster. Within each node, there are one or more Stores. Within each Store, there are many Regions.\n\nWhen 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.\n\n## Quick start\n\n### Deploy a playground with TiUP\n\nThe most quickest to try out TiKV with TiDB is using TiUP, a component manager for TiDB.\n\nYou can see [this page](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-environment-using-tiup-playground) for a step by step tutorial.\n\n### Deploy a playground with binary\n\nTiKV is able to run separately with PD, which is the minimal deployment required.\n\n1. Download and extract binaries.\n\n```bash\n$ export TIKV_VERSION=v7.5.0\n$ export GOOS=darwin  # only {darwin, linux} are supported\n$ export GOARCH=amd64 # only {amd64, arm64} are supported\n$ curl -O  https://tiup-mirrors.pingcap.com/tikv-$TIKV_VERSION-$GOOS-$GOARCH.tar.gz\n$ curl -O  https://tiup-mirrors.pingcap.com/pd-$TIKV_VERSION-$GOOS-$GOARCH.tar.gz\n$ tar -xzf tikv-$TIKV_VERSION-$GOOS-$GOARCH.tar.gz\n$ tar -xzf pd-$TIKV_VERSION-$GOOS-$GOARCH.tar.gz\n```\n\n2. Start PD instance.\n\n```bash\n$ ./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\n```\n\n3. Start TiKV instance.\n\n```bash\n$ ./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\n```\n\n4. Install TiKV Client(Python) and verify the deployment, required Python 3.5+.\n\n```bash\n$ pip3 install -i https://test.pypi.org/simple/ tikv-client\n```\n\n```python\nfrom tikv_client import RawClient\n\nclient = RawClient.connect(\"127.0.0.1:2379\")\n\nclient.put(b'foo', b'bar')\nprint(client.get(b'foo')) # b'bar'\n\nclient.put(b'foo', b'baz')\nprint(client.get(b'foo')) # b'baz'\n```\n\n### Deploy a cluster with TiUP\n\nYou can see [this manual](./doc/deploy.md) of production-like cluster deployment presented by @c4pt0r.\n\n### Build from source\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md).\n\n## Client drivers\n\n- [Go](https://github.com/tikv/client-go) (The most stable and widely used)\n- [Java](https://github.com/tikv/client-java)\n- [Rust](https://github.com/tikv/client-rust)\n- [C](https://github.com/tikv/client-c)\n\nIf you want to try the Go client, see [Go Client](https://tikv.org/docs/4.0/reference/clients/go/).\n\n## Security\n\n### Security audit\n\nA third-party security auditing was performed by Cure53. See the full report [here](./security/Security-Audit.pdf).\n\n### Reporting Security Vulnerabilities\n\nTo report a security vulnerability, please send an email to [TiKV-security](mailto:tikv-security@lists.cncf.io) group.\n\nSee [Security](SECURITY.md) for the process and policy followed by the TiKV project.\n\n## Communication\n\nCommunication within the TiKV community abides by [TiKV Code of Conduct](./CODE_OF_CONDUCT.md). Here is an excerpt:\n\n\u003e In the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to making participation in our project and\nour community a harassment-free experience for everyone, regardless of age, body\nsize, disability, ethnicity, sex characteristics, gender identity and expression,\nlevel of experience, education, socio-economic status, nationality, personal\nappearance, race, religion, or sexual identity and orientation.\n\n### Social Media\n\n- [Twitter](https://twitter.com/tikvproject)\n- [Blog](https://tikv.org/blog/)\n- [Reddit](https://www.reddit.com/r/TiKV)\n- Post questions or help answer them on [Stack Overflow](https://stackoverflow.com/questions/tagged/tikv)\n\n### Slack\n\nJoin the TiKV community on [Slack](https://slack.tidb.io/invite?team=tikv-wg\u0026channel=general) - Sign up and join channels on TiKV topics that interest you.\n\n## License\n\nTiKV is under the Apache 2.0 license. See the [LICENSE](./LICENSE) file for details.\n\n## Acknowledgments\n\n- Thanks [etcd](https://github.com/coreos/etcd) for providing some great open source tools.\n- Thanks [RocksDB](https://github.com/facebook/rocksdb) for their powerful storage engines.\n- Thanks [rust-clippy](https://github.com/rust-lang/rust-clippy). We do love the great project.\n","funding_links":[],"categories":["HarmonyOS","Misc","Rust","Applications","Databases","Rust Tools","Rust Tools and Frameworks","应用","应用 Applications","其他__大数据","语言资源库","应用程序 Applications","Uncategorized","rust","Rust Tools, Libraries, and Frameworks","Database","Tools","软件","数据库"],"sub_categories":["Windows Manager","Database","Key-Value Databases","In-memory data grids","数据库","Interfaces","数据库 Database","网络服务_其他","rust","Misc","Uncategorized","E-Books","VS Code Extensions for Developer Productivity","Mesh networks","JavaScript Libraries for Machine Learning"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftikv%2Ftikv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftikv%2Ftikv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftikv%2Ftikv/lists"}