LedisDB

A high performance NoSQL like Redis based on LevelDB implemented by Golang.

View on GitHub

Data Structure

Rich advanced data structure: KV, List, Hash, ZSet, Bitmap.

LevelDB Rocks

Uses leveldb to store massive data, disk-based storage, over the memory limit.

Expiration & TTL

Supports expiration and ttl in all kinds of data structures.

CLI Support

Redis clients, like redis-cli, are supported directly.

Multi-Clients

Multiple clients API supports, including Golang, Python, Lua(Openresty).

Easy Embedding

Easy to embed in Golang application.

Data Protection

Replication to guarantee data safety.

Useful Tools

Supplies tools to load, dump, and repair database.

Examples


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

//another shell
ledis-cli -p 6380

ledis 127.0.0.1:6380> set a 1
OK
ledis 127.0.0.1:6380> get a
"1"
        

Lib Example


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

db.Set(key, value)

db.Get(key)
          

Benchmark

Redis SSDB LedisDB
SET 42735.04 35971.22 38759.69
GET 45871.56 47393.37 40160.64
INCR 45248.87 36630.04 36101.08
LPUSH 45045.04 37174.72 33003.30
LPOP 43103.45 38167.94 27624.31
LPUSH-lrange 44843.05 37593.98 32894.74
LRANGE_100 14727.54 905.55 7352.94
LRANGE_300 6915.63 327.78 2867.79
LRANGE_500 5042.86 222.36 1778.41
LRANGE_600 3960.40 165.30 1590.33
MSET 33003.30 33112.59 21881.84

For more information, please take a look at benchmark.md.