{"id":13440968,"url":"https://github.com/Tencent/Tendis","last_synced_at":"2025-03-20T11:34:23.944Z","repository":{"id":37391480,"uuid":"321853986","full_name":"Tencent/Tendis","owner":"Tencent","description":"Tendis is a high-performance distributed storage system fully compatible with the Redis protocol. ","archived":false,"fork":false,"pushed_at":"2025-03-17T07:44:16.000Z","size":84338,"stargazers_count":3004,"open_issues_count":143,"forks_count":331,"subscribers_count":59,"default_branch":"unstable","last_synced_at":"2025-03-17T08:40:30.503Z","etag":null,"topics":["cpp17","high-performance","kv","kvstore","nosql","redis","rocksdb","tendis"],"latest_commit_sha":null,"homepage":"http://tendis.cn","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tencent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","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}},"created_at":"2020-12-16T03:12:23.000Z","updated_at":"2025-03-17T07:44:20.000Z","dependencies_parsed_at":"2025-03-17T08:43:15.343Z","dependency_job_id":null,"html_url":"https://github.com/Tencent/Tendis","commit_stats":null,"previous_names":[],"tags_count":53,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tencent%2FTendis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tencent%2FTendis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tencent%2FTendis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tencent%2FTendis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tencent","download_url":"https://codeload.github.com/Tencent/Tendis/tar.gz/refs/heads/unstable","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244598606,"owners_count":20479175,"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":["cpp17","high-performance","kv","kvstore","nosql","redis","rocksdb","tendis"],"created_at":"2024-07-31T03:01:28.382Z","updated_at":"2025-03-20T11:34:23.922Z","avatar_url":"https://github.com/Tencent.png","language":"C++","readme":"\u003cimg src=\"pic/tendis.svg\" width = \"300\" alt=\"tendis\"/\u003e\n\n[![](https://img.shields.io/badge/license-GPLv3-green)](https://github.com/Tencent/Tendis/blob/master/LICENSE.txt) ![](https://img.shields.io/badge/Platform-Linux_x64-orange) [![](https://img.shields.io/badge/PRs-Welcome-orange)](https://github.com/Tencent/Tendis/pulls)\n\nTendis is a high-performance distributed storage system which is fully compatible with the Redis protocol. [中文文档](http://tendis.cn)\n\n## Table of Contents\n- [Introduction](#Introduction)\n- [Features](#Features)\n- [Get Started](#Get-Started)\n  - [Requirements](#Requirements)\n  - [Build](#Build)\n  - [Run and Play](#Run-and-Play)\n  - [Test](#Test)\n- [Performance](#Performance)\n  - [Hardware Spec](#Hardware-spec)\n  - [Bechmarks and QPS numbers](#Bechmarks-and-QPS-numbers)\n  - [QPS on different payload](#QPS-on-different-payload)\n- [Contributing](#Contributing)\n- [Support](#Support)\n- [License](#License)\n## Introduction\n\nTendis is a high-performance distributed storage system which is fully compatible with the Redis protocol. It uses RocksDB as the storage engine, and all data is stored to disks through RocksDB. Users can access Tendis using a Redis client, and the application hardly needs to be changed. In addition, Tendis supports storage capacity far exceeding memory, which can greatly reduce user storage costs.\n\nSimilar to Redis clusters, Tendis uses a decentralized distributed solution. The gossip protocol is used for communication between nodes, and all nodes in a cluster can be routed to the correct node when a user accesses. Cluster nodes support automatic discovery of other nodes, detect faulty nodes, and ensure the application is almost not affected when the master node failed.\n\n## Features\n\n- Redis compatibility\n\n  Redis protocol and commands supported in Tendis are compatible with Redis.\n\n- Persistent storage\n\n  Using RocksDB as storage engine. All data is stored in RocksDB in a specific format, supporting PB-level storage capacity.\n\n- Decentralized distributed cluster\n\n  Distributed implementation like Redis clusters, using a gossip protocol to intercommunicate between nodes.\n\n- Horizontal scalability\n\n  Data migration online between nodes. High performance and linear scalability up to 1,000 nodes.\n\n- Failover\n\n  Auto-detect non-working nodes, and promote replica nodes to master when a failure occurs.\n\n- Key component for Tendis Hybrid Storage Edition\n\n  Thanks to the design and internal optimization, Redis and Tendis can work together to be Hybrid Storage Edition. It is suitable for KV storage scenarios, as it balances performance and cost, and greatly reduces your business operating costs by 80% in the scenarios where cold data takes up a lot of storage space.\n\n## Get Started\n\n### Requirements\n\n* g++ (required by c++17, version \u003e= 5.5)\n* cmake (version \u003e= 3.13.0)\n\n### Build\n\n```\n$ git clone https://github.com/Tencent/tendis.git --recursive\n$ git submodule update --init --recursive\n$ mkdir bulid\n$ cd build \u0026 cmake ..\n$ make -j12\n```\n\n### Run and Play\n```\n$ ./build/bin/tendisplus tendisplus.conf\n```\nConnect to the server via redis-cli\n```\n$ redis-cli -p 51002\n```\n\n### TEST\nYou can make some change to the code and make sure the following test  script pass.\n```\n$ sh ./testall.sh\n```\n\n## Performance\n\n### Hardware spec\n\n```\nCPU:2.50 GHz,48 core\nDISK:NVMe SSD\nMEM:192GB\n```\n\n### Benchmarks and QPS numbers\n\ntendisplus: workers = 56\n```\n./memtier_benchmark -t 20 -c 50 -s 127.0.0.1 -p 51002 --distinct-client-seed --command=\"set __key__ __data__\" --key-prefix=\"kv_\" --key-minimum=1 --key-maximum=500000000 --random-data --data-size=128 --test-time=1800\n./memtier_benchmark -t 20 -c 50 -s 127.0.0.1 -p 51002 --distinct-client-seed --command=\"get __key__\" --key-prefix=\"kv_\" --key-minimum=1 --key-maximum=500000000 --test-time=1800\n./memtier_benchmark -t 20 -c 50 -s 127.0.0.1 -p 51002 --distinct-client-seed --command=\"incr __key__\" --key-prefix=\"int_\" --key-minimum=1 --key-maximum=1000000 --test-time=1800\n./memtier_benchmark -t 20 -c 50 -s 127.0.0.1 -p 51002 --distinct-client-seed --command=\"lpush __key__ __data__\" --key-prefix=\"list_\" --key-minimum=1 --key-maximum=1000000 --random-data --data-size=128 --test-time=1800\n./memtier_benchmark -t 20 -c 50 -s 127.0.0.1 -p 51002 --distinct-client-seed --command=\"sadd __key__ __data__\" --key-prefix=\"set_\" --key-minimum=1 --key-maximum=1000000 --random-data --data-size=128 --test-time=1800\n./memtier_benchmark -t 20 -c 50 -s 127.0.0.1 -p 51002 --distinct-client-seed --command=\"zadd __key__ __key__ __data__\" --key-prefix=\"\" --key-minimum=1 --key-maximum=1000000 --random-data --data-size=128 --test-time=1800\n./memtier_benchmark -t 20 -c 50 -s 127.0.0.1 -p 51002 --distinct-client-seed --command=\"hset __key__ __data__ __data__\" --key-prefix=\"hash_\" --key-minimum=1 --key-maximum=1000000 --random-data --data-size=128 --test-time=1800\n```\n   ![image.png](pic/qps.png)\n\nlatency:\n```\nSET    1.6ms    99%\nSET    2.2ms    99.9%\nSET    6.9ms    99.99%\nSET    9.4ms    100.00%\n```\n\n###  QPS on different payload\n\ntendisplus: workers = 56\n```\n./memtier_benchmark -t 20 -c 50 -s 127.0.0.1 -p 51002 --distinct-client-seed --command=\"set __key__ __data__\" --key-prefix=\"kv_\" --command-key-pattern=R --random-data --data-size=128 --test-time=1800\n./memtier_benchmark -t 20 -c 50 -s 127.0.0.1 -p 51002 --distinct-client-seed --command=\"get __key__\" --key-prefix=\"kv_\" --command-key-pattern=R --test-time=1800\n```\n![image.png](pic/qps_payload.png)\n\nwe test set for half an hour, and then test get key half an hour. because the data is not big enough, most of the data is in memory, so the get qps for different payload is nearly the same.\n\n## Contributing\n\nFor more information regarding contributing issues or pull requests, checkout [CONTRIBUTING](CONTRIBUTING.md)\n\n## Support\n\nCheckout [support](http://tendis.cn/#/support) for FAQs or join our discussion groups.\n\n## License\n\nTendis is licensed under the GNU General Public License Version 3.0. Copyright and license information can be found in the file [LICENSE.txt](LICENSE.txt).\n","funding_links":[],"categories":["C++","Database","大厂开源"],"sub_categories":["腾讯开源"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTencent%2FTendis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTencent%2FTendis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTencent%2FTendis/lists"}