{"id":13522633,"url":"https://github.com/apache/kvrocks","last_synced_at":"2026-02-27T03:08:49.449Z","repository":{"id":36962859,"uuid":"202483348","full_name":"apache/kvrocks","owner":"apache","description":"Apache Kvrocks is a distributed key value NoSQL database that uses RocksDB as storage engine and is compatible with Redis protocol.","archived":false,"fork":false,"pushed_at":"2025-05-04T13:34:22.000Z","size":12340,"stargazers_count":3859,"open_issues_count":175,"forks_count":526,"subscribers_count":74,"default_branch":"unstable","last_synced_at":"2025-05-05T04:29:15.965Z","etag":null,"topics":["database","distributed","kv","namespace","redis","redis-cluster"],"latest_commit_sha":null,"homepage":"https://kvrocks.apache.org/","language":"C++","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/apache.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-08-15T06:04:51.000Z","updated_at":"2025-05-04T05:41:50.000Z","dependencies_parsed_at":"2023-09-22T16:02:40.673Z","dependency_job_id":"97740214-dfaa-4347-a4bb-32a654cf5422","html_url":"https://github.com/apache/kvrocks","commit_stats":{"total_commits":1624,"total_committers":137,"mean_commits":"11.854014598540147","dds":0.7850985221674877,"last_synced_commit":"2a0c57ac7fc4499a210bc452884025a0010cb470"},"previous_names":["apache/kvrocks","kvrockslabs/kvrocks","apache/incubator-kvrocks"],"tags_count":90,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fkvrocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fkvrocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fkvrocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fkvrocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/kvrocks/tar.gz/refs/heads/unstable","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254010790,"owners_count":21998993,"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":["database","distributed","kv","namespace","redis","redis-cluster"],"created_at":"2024-08-01T06:00:50.328Z","updated_at":"2025-12-15T14:52:25.987Z","avatar_url":"https://github.com/apache.png","language":"C++","readme":"\u003c!--\n Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements.  See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership.  The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License.  You may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an\n \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n KIND, either express or implied.  See the License for the\n specific language governing permissions and limitations\n under the License.\n--\u003e\n\n\u003cimg src=\"https://kvrocks.apache.org/img/kvrocks-featured.png\" alt=\"kvrocks_logo\" width=\"350\"/\u003e\n\n[![CI](https://github.com/apache/kvrocks/actions/workflows/kvrocks.yaml/badge.svg?branch=unstable)](https://github.com/apache/kvrocks/actions/workflows/kvrocks.yaml)\n[![License](https://img.shields.io/github/license/apache/kvrocks)](https://github.com/apache/kvrocks/blob/unstable/LICENSE)\n[![GitHub stars](https://img.shields.io/github/stars/apache/kvrocks)](https://github.com/apache/kvrocks/stargazers)\n\n---\n* [Chat on Zulip](https://kvrocks.zulipchat.com/)\n* [Mailing List](https://lists.apache.org/list.html?dev@kvrocks.apache.org) ([how to subscribe](https://www.apache.org/foundation/mailinglists.html#subscribing))\n\n**Apache Kvrocks** is a distributed key value NoSQL database that uses RocksDB as storage engine and is compatible with Redis protocol. Kvrocks intends to decrease the cost of memory and increase the capacity while compared to Redis. The design of replication and storage was inspired by [rocksplicator](https://github.com/pinterest/rocksplicator) and [blackwidow](https://github.com/Qihoo360/blackwidow).\n\nKvrocks has the following key features:\n\n* Redis Compatible: Users can access Apache Kvrocks via any Redis client.\n* Namespace: Similar to Redis SELECT but equipped with token per namespace.\n* Replication: Async replication using binlog like MySQL.\n* High Availability: Support Redis sentinel to failover when master or slave was failed.\n* Cluster: Centralized management but accessible via any Redis cluster client.\n\n## Who uses Kvrocks\n\nYou can find Kvrocks users at [the Users page](https://kvrocks.apache.org/users/).\n\nUsers are encouraged to add themselves to the Users page. Either leave a comment on the [\"Who is using Kvrocks\"](https://github.com/apache/kvrocks/issues/414) issue, or directly send a pull request to add company or organization [information](https://github.com/apache/kvrocks-website/blob/main/src/components/UserLogos/index.tsx) and [logo](https://github.com/apache/kvrocks-website/tree/main/static/media/users).\n\n## Build and run Kvrocks\n\n### Prerequisite\n\n```shell\n# Ubuntu / Debian\nsudo apt update\nsudo apt install -y git build-essential cmake libtool python3 libssl-dev\n\n# CentOS / RedHat\nsudo yum install -y centos-release-scl-rh\nsudo yum install -y git devtoolset-11 autoconf automake libtool libstdc++-static python3 openssl-devel\n# download and install cmake via https://cmake.org/download\nwget https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-linux-x86_64.sh -O cmake.sh\nsudo bash cmake.sh --skip-license --prefix=/usr\n# enable gcc and make in devtoolset-11\nsource /opt/rh/devtoolset-11/enable\n\n# openSUSE / SUSE Linux Enterprise\nsudo zypper install -y gcc11 gcc11-c++ make wget git autoconf automake python3 curl cmake\n\n# Arch Linux\nsudo pacman -Sy --noconfirm autoconf automake python3 git wget which cmake make gcc\n\n# macOS\nbrew install git cmake autoconf automake libtool openssl\n# please link openssl by force if it still cannot be found after installing\nbrew link --force openssl\n```\n\n### Build\n\nIt is as simple as:\n\n```shell\n$ git clone https://github.com/apache/kvrocks.git\n$ cd kvrocks\n$ ./x.py build # `./x.py build -h` to check more options\n```\n\nTo build with TLS support, you'll need OpenSSL development libraries (e.g. libssl-dev on Debian/Ubuntu) and run:\n\n```shell\n$ ./x.py build -DENABLE_OPENSSL=ON\n```\n\nTo build with lua instead of luaJIT, run:\n\n```shell\n$ ./x.py build -DENABLE_LUAJIT=OFF\n```\n\nBuild with debug mode, run:\n\n```shell\n# The default build type is RelWithDebInfo and its optimization level is typically -O2.\n# You can change it to -O0 in debug mode.\n\n$ ./x.py build -DCMAKE_BUILD_TYPE=Debug\n```\n\n### Running Kvrocks\n\n```shell\n$ ./build/kvrocks -c kvrocks.conf\n```\n\n### Running Kvrocks using Docker\n\n```shell\n$ docker run -it -p 6666:6666 apache/kvrocks --bind 0.0.0.0\n# or get the nightly image:\n$ docker run -it -p 6666:6666 apache/kvrocks:nightly\n```\n\nPlease visit [Apache Kvrocks on DockerHub](https://hub.docker.com/r/apache/kvrocks) for additional details about images.\n\n### Connect Kvrocks service\n\n```sh\n$ redis-cli -p 6666\n\n127.0.0.1:6666\u003e get a\n(nil)\n```\n\n### Running test cases\n\n```shell\n$ ./x.py build --unittest\n$ ./x.py test cpp # run C++ unit tests\n$ ./x.py test go # run Golang (unit and integration) test cases\n```\n\n### Supported platforms\n\n* OS: Linux and macOS\n* arch: x86_64, ARM and RISC-V\n\n## Namespace\n\nNamespace is used to isolate data between users. Unlike all the Redis databases can be visited by `requirepass`, we use one token per namespace. `requirepass` is regraded as admin token, and only admin token allows to access the namespace command, as well as some commands like `config`, `slaveof`, `bgsave`, etc. See the [Namespace](https://kvrocks.apache.org/docs/namespace) page for more details.\n\n```sh\n# add token\n127.0.0.1:6666\u003e namespace add ns1 my_token\nOK\n\n# update token\n127.0.0.1:6666\u003e namespace set ns1 new_token\nOK\n\n# list namespace\n127.0.0.1:6666\u003e namespace get *\n1) \"ns1\"\n2) \"new_token\"\n3) \"__namespace\"\n4) \"foobared\"\n\n# delete namespace\n127.0.0.1:6666\u003e namespace del ns1\nOK\n```\n\n## Cluster\n\nKvrocks implements a proxyless centralized cluster solution but its accessing method is completely compatible with Redis cluster clients. You can use Redis cluster SDKs to access the kvrocks cluster. For more details, please refer to [Kvrocks Cluster Introduction](https://kvrocks.apache.org/docs/cluster/).\n\n## Documents\n\nDocuments are hosted at the [official website](https://kvrocks.apache.org/docs/getting-started/).\n\n* [Supported Commands](https://kvrocks.apache.org/docs/supported-commands/)\n* [Design Complex Structure on RocksDB](https://kvrocks.apache.org/community/data-structure-on-rocksdb/)\n* [Replication Design](https://kvrocks.apache.org/docs/replication)\n\n## Tools\n\n* To manage Kvrocks clusters for failover, scaling up/down and more, use [kvrocks-controller](https://github.com/apache/kvrocks-controller)\n* To export the Kvrocks monitor metrics, use [kvrocks_exporter](https://github.com/RocksLabs/kvrocks_exporter)\n* To migrate from Redis to Kvrocks, use [RedisShake](https://github.com/tair-opensource/RedisShake)\n* To migrate from Kvrocks to Redis, use `kvrocks2redis` built via `./x.py build`\n\n## Contributing\n\nKvrocks community welcomes all forms of contribution and you can find out how to get involved on the [Community](https://kvrocks.apache.org/community/) and [How to Contribute](https://kvrocks.apache.org/community/contributing) pages.\n\n## License\n\nApache Kvrocks is licensed under the Apache License Version 2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE) for details.\n\n## Social Media\n\n- [Medium](https://kvrocks.medium.com/)\n- [X (Twitter)](https://twitter.com/apache_kvrocks)\n- [Zhihu](https://www.zhihu.com/people/kvrocks) (in Chinese)\n- WeChat Official Account (in Chinese, scan the QR code to follow)\n\n![WeChat official account](assets/wechat_account.jpg)\n","funding_links":[],"categories":["C++","\u003ca name=\"cpp\"\u003e\u003c/a\u003eC++","Database"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fkvrocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fkvrocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fkvrocks/lists"}