@siddontang siddontang released this Aug 5, 2014 · 580 commits to master since this release

Assets 2

LedisDB is a high performance NoSQL like Redis, may be an alternative for Redis.

LedisDB supports some awesome features, below:

  • Rich advanced data structure: KV, List, Hash, ZSet, Bitmap.
  • Stores lots of data, over the memory limit.
  • Various backend database to use: LevelDB, goleveldb, LMDB, RocksDB, BoltDB.
  • Supports expiration and ttl.
  • Redis clients, like redis-cli, are supported directly.
  • Multi client API supports, including Go, Python, Lua(Openresty), Node.js.
  • Easy to embed in Go application.
  • Restful API support, json/bson/msgpack output.
  • Replication to guarantee data safe.
  • Supplies tools to load, dump, repair database.
  • Linux, Mac OSX, Windows support.

Server Example

ledis-server -config=/etc/ledis.json

//another shell
ledis-cli -p 6380

ledis> set a 1
ledis> get a

//use curl
→ {"SET":[true,"OK"]}

→ {"GET":"world"}

Package Example

import "github.com/siddontang/ledisdb/ledis"
l, _ := ledis.Open(cfg)
db, _ := l.Select(0)

db.Set(key, value)



See benchmark for more.


See Issues todo


LedisDB now change the database saved path, it will save data to data_dir/leveldb for LevelDB, data_dir/lmdb for LMDB, and same for others.

So if you used LevelDB before, you must move old data_dir/data to data_dir/leveldb by hand.