Skip to content

A C++11 implementation of Redis Server, including cluster, use Leveldb for persist storage

License

Notifications You must be signed in to change notification settings

loveyacper/Qedis

Repository files navigation

 _____     _____   _____   _   ______                  
/  _  \   | ____| |  _  \ | | /  ___/                        
| | | |   | |__   | | | | | | | |____
| | | |   |  __|  | | | | | |  \__   \
| |_| |_  | |___  | |_| | | |  ___|  |
\_______| |_____| |_____/ |_| /_____/

Build Status

看中文说明请点我

A C++11 implementation of distributed redis server, use Leveldb for persist storage.(including cluster)

Requirements

  • C++11 & CMake
  • Linux or OS X

Cluster Features

Use zookeeper for leader election, to reach high availability.

Of course you can also use redis-sentinel.

See details in cluster Readme, still in development.

Fully compatible with redis

You can test Qedis with redis-cli, redis-benchmark, or use redis as master with Qedis as slave or conversely, it also can work with redis sentinel. In a word, Qedis is full compatible with Redis.

Support module for write your own extensions

Qedis supports module now, still in progress, much work to do. I added three commands(ldel, skeys, hgets) for demonstration.

Persistence: Not limited to memory

Leveldb can be configured as backend for Qedis.

High Performance

  • Qedis is approximately 20-25% faster than redis if run benchmark with pipeline requests(set -P = 50 or higher).
  • Average 80K requests per seconds for write, and 90K requests per seconds for read.
  • Before run test, please ensure that std::list::size() is O(1), obey the C++11 standards.

Run this command, compare with redis use pipeline commands, try it.

./redis-benchmark -q -n 1000000 -P 50 -c 50

image

Support LRU cache

When memory is low, you can make Qedis to free memory by evict some key according to LRU.

Master-slave Replication, transaction, RDB/AOF, slow log, publish-subscribe

Qedis supports them all :-)

Command List

show all supported commands list, about 140 commands

  • cmdlist

TODO

  • Support lua
  • Golang Cluster client

About

A C++11 implementation of Redis Server, including cluster, use Leveldb for persist storage

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages