ZanRedisDB is a distributed redis cluster with strong consistency.
Compatible with redis protocol: most redis command is supported in ZanRedisDB, so you can replace Redis with ZanRedisDB and get a more powerful cluster with unlimited data.
Namespace and set supported: You can use the namespace and set as prefix to isolate different data to make operation more easily.
Strong consistence and persistence: Use raft and rocksdb to make sure all the data have the consistence replication and persistent on stable storage.
Scalability: You can easily increase the cluster capacity just by adding more machines.
Multi-DC support: multi data centers deployment can be supported with rackaware feature.
ZanRedisDB
What is ZanRedisDB
ZanRedisDB is a distributed redis cluster with strong consistency.
Build
Install the compress library
Build the rocksdb with jemalloc
Install the dependency (for old go version only, if using go1.13+, it will be done in go modules):
use the
dep ensureto install other dependencies or use go modules for go1.13+Build zankv and placedriver from the source (only support go version 1.10+, gcc 4.9+ or xcode-command-line-tools on Mac):
If you want package the binary release run the scripts
Deploy
placedriver -config=/path/to/configzankv -config=/path/to/configOS-Level Tuning
vm.swappiness=0vm.min_free_kbytesto at least 1GB (8GB on larger memory system)vm.zone_reclaim_mode=0echo 4 > /proc/sys/net/ipv4/tcp_delack_min(for old OS only)API
placedriver has several HTTP APIs to manager the namespace
GET /namespacesGET /datanodesGET /listpdGET /query/namespace_namePOST /cluster/namespace/create?namespace=test_p16&partition_num=16&replicator=3POST /cluster/namespace/delete?namespace=test_p16&partition=**storage server HTTP APIs for stats:
GET /statsGET /raft/statsPOST /kv/optimizeGET /cluster/leader/namespace-partitionstorage server also support the redis apis for read/write :
Client
Golang client SDK : client-sdk , a redis proxy can be deployed based on this golang sdk if you want use the redis client in other language.
Architechture
Roadmap
Thanks
Many thanks for these great projects which make this project possible: etcd, RocksDB, ledisdb, pika.