Corvus is a fast and lightweight redis cluster proxy for redis 3.0 with cluster mode enabled.
Most redis client implementations don't support redis cluster. We have a lot of services relying
on redis, which are written in Python, Java, Go, Nodejs etc. It's hard to provide redis client
libraries for multiple languages without breaking compatibilities. We used twemproxy
before, but it relies on sentinel for high availabity, it also requires restarting to add or
remove backend redis instances, which causes service interruption. And twemproxy is single
threaded, we have to deploy multiple twemproxy instances for large number of clients, which
causes the sa headaches.
Therefore, we made corvus.
- Painless upgrade to official redis cluster from twemproxy.
- Multiple threading.
- Reuseport support.
- Pipeline support.
- Statsd integration.
- Syslog integration.
- Can direct read operations to slaves.
- Linux >= 3.9
If use the releases downloaded from
releases page, just make:
With debug mode enabled:
If build from latest source:
git clone https://github.com/eleme/corvus.git cd corvus git submodule update --init make deps # need autoconf make
Binary can be found at
Example configuration file is at corvus.conf.
$ ./src/corvus path/to/corvus.conf
- All single-key commands (like
INCR..) are supported.
- Batch commands are split into multiple single-key commands.
- Commands performing complex multi-key operations like unions or intersections
are available as well as long as the keys all belong to the same node.
MGET: split to multiple
MSET: split to multiple
DEL: split to multiple single key
EXISTS: split to multiple single key
PING: ignored and won't be forwarded.
TIME: won't be forwarded to backend redis, information collected in proxy
will be returned.
AUTH: do authentication in proxy.
EVAL: at least one key should be given. If there are multiple keys, all of
them should belong to the same node.
The following commands require all argument keys to belong to the same redis node:
The following commands are not available, such as
KEYS, we can't search keys across
all backend redis instances.
MIT. Copyright (c) 2016 Eleme Inc.
See LICENSE for details.