Code Monkey home page Code Monkey logo

corvus's Introduction

Corvus

Build Status

A fast and lightweight Redis Cluster Proxy for Redis 3.0 with cluster mode enabled focused on Linux >= 3.9. Clients designed for normal mode Redis can still be used through the proxy. Redirection errors are handled and slot map is cached in proxy.

Build

Build from source:

$ make

Build in debug mode:

$ make debug

Run Proxy

Configuration file:

# corvus.conf

# binding port
bind 12345

# redis cluster nodes, comma separated list, can supply only one node
node localhost:8000,localhost:8001,localhost:8002

# threads share the same binding port using SO_REUSEPORT
thread 4

# log level, available values: debug, info, warn, error
# if not supplied or wrong value `info` is used
loglevel info

# whether log to syslog
syslog 0

Run proxy:

./src/corvus corvus.conf

Commands

All single key commands are supported. 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.

Modified commands

  • MGET: split to multiple GET
  • MSET: split to multiple SET
  • DEL: split to multiple single key DEL
  • EXISTS: split to multiple single key EXISTS
  • PING: not forward to redis server
  • INFO: not forward to redis server, return information collected in proxy

Restricted commands

  • EVAL: at least one key, if mutiple keys given, all keys should belong to same node

All keys should belong to the same node

# key
SORT(with STORE)

# list
RPOPLPUSH

# set
SDIFF SDIFFSTORE SINTER SINTERSTORE SMOVE SUNION SUNIONSTORE

# sorted set
ZINTERSTORE ZUNIONSTORE

# hyperloglog
PFCOUNT PFMERGE

Unsupported commands

KEYS MIGRATE MOVE OBJECT RANDOMKEY RENAME RENAMENX SCAN WAIT

# string
BITOP MSETNX

# list
BLPOP BRPOP BRPOPLPUSH

# pub/sub
PSUBSCRIBE PUBLISH PUBSUB PUNSUBSCRIBE SUBSCRIBE UNSUBSCRIBE

# script
EVALSHA SCRIPT

# transaction
DISCARD EXEC MULTI UNWATCH WATCH

# cluster
CLUSTER

AUTH ECHO QUIT SELECT

BGREWRITEAOF BGSAVE CLIENT COMMAND CONFIG DBSIZE DEBUG FLUSHALL FLUSHDB LASTSAVE
MONITOR ROLE SAVE SHUTDOWN SLAVEOF SLOWLOG SYNC TIME

corvus's People

Contributors

hit9 avatar maralla avatar xinming90 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.