LedisDB

A high performance NoSQL like Redis implemented by Golang.

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 & 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 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.

RESTful API

HTTP interfaces, can be directly accessed by HTTP Clients.

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

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


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