Rich advanced data structure: KV, List, Hash, ZSet, Bitmap.
Various backend databases to choose: LevelDB, goleveldb, LMDB, RocksDB.
Supports expiration and ttl in all kinds of data structures.
Redis clients, like redis-cli, are supported directly.
Multiple clients API supports, including Golang, Python, Lua(Openresty).
Easy to embed in Golang application.
Replication to guarantee data safety.
Supplies tools to load, dump, and repair database.
./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"
import "github.com/siddontang/ledisdb/ledis"
l, _ := ledis.Open(cfg)
db, _ := l.Select(0)
db.Set(key, value)
db.Get(key)
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.