LedisDB

A high performance NoSQL like Redis implemented by Go.

View on GitHub

Data Structure

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

Various Backend

Various backend databases to choose:

LevelDB, goleveldb, LMDB, RocksDB or BoltDB.

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 Go, Python, Lua(Openresty).

Easy Embedding

Easy to embed in Go application.

Data Protection

Replication to guarantee data safety.

Useful Tools

Supplies tools to load, dump, and repair database.

RESTful API

HTTP interfaces, can be directly accessed by HTTP Clients.

Supplies json、bson、msgpack as request content-type.

CLI Example


./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"
        

RESTful Example


//use curl
curl http://127.0.0.1:11181/SET/hello/world
→ {"SET":[true,"OK"]}

curl http://127.0.0.1:11181/0/GET/hello?type=json
→ {"GET":"world"}
        

Lib Example


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

db.Set(key, value)

db.Get(key)
          

Benchmark


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