Archives | Categories


Table of Contents

1. Introduction

Redis-LevelDB is a redis-protocol compatible frontend to google's leveldb: Use leveldb as a Redis-Server.

You can get it from

2. Redis COMMAND Supported

2.1. key-value commands:

  • incr/incrby
  • get/set
  • mget/mset

2.2. hash commands(New):

  • hget
  • hset
  • hsetnx
  • hdel
  • hexists
  • hgetall
  • hkeys
  • hvals
  • hlen

2.3. set commands(New):

  • sadd
  • srem
  • scard
  • smembers
  • sismemeber

2.4. transaction commands:

  • multi
  • exec
  • discard

2.5. connection commans:

  • select: select db (when redis-leveldb run in multi-db mode, with argument -M <num>)

2.6. server commands:

  • keys
  • info: Different to redis, this info command accepts a flag argument, eg info, info k, info t, info kt
    • default: show leveldb.stat info
    • k: show the count of all keys
    • t: show leveldb.sstables info

3. Dependencies

  • libev(>=1.4): install with apt-get or port please.
  • gmp( install with apt-get or port please.
  • libsnappy
  • leveldb:
    • git clone git://
    • cd redis-leveldb
    • git submodule init
    • git submodule update

4. Compile


5. Run

./redis-leveldb -h

5.1. options:

  • -d: run redis-level as a daemon process
  • -H <host-ip>: host addr to listen on(eg:
  • -P <port>: port to listen on(default 8323)
  • -D <data-dir>: leveldb data dir(default "redis.db" under your work directory)
  • -M <number>: run in multi-db mode and set its db count to <number>, each db in the server is a separatly leveldb database and its data directory is a directory named db-<num> under the directory you specified with the option -D; you can use command select to switch db on the client side while redis-leveldb is running in this mode.

6. Test Suite

  • dependencies: perl5(>=v5.10) with
  • run test: make test

7. Known Issues

  • issue 13: signle data package size limitation.

8. Bug Report

9. Discuss and Comment

Have few questions or feedback? Feel free to send me(killian.zhuo📧 an email!


Built with Emacs 29.0.50 (Org mode 9.5.2).

Last updated: 2024-06-08 Sat 07:25.