- Notifications
You must be signed in to change notification settings - Fork0
A NoSQL database implementation, alternative to redis.
License
NotificationsYou must be signed in to change notification settings
gushitong/rekkles
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
rekkles is a high performance no-sql database build onBadgerDB with redis protocolsupport. It meant to provide a key-value store alternative to redis.
- Pure
golang
implementation, noc/c++
dependency - Compatible with redis protocol, Redis client are supported
- Persistent all data to the disk
- Better transaction support, ttl support
go get github.com/gushitong/rekkles
rekkles
server start options:
rekkles -hUsage of rekkles: -a string auth string -b string listen address (default":6380") -d string working dir (default"/tmp/rekkles") -v string value log dir (default"/tmp/rekkles") -s bool sync all writes to disk. Setting this tofalse would achieve better performance, but may cause data to be lost. (default true)
- start
rekkles
server:
$ rekkles -d /tmp/araydb -v /tmp/araydb -b :63802018/09/29 12:05:53 started server at :6380
- connect
rekkles
withredis-cli
:
$ redis-cli -p 6380127.0.0.1:6380> SET k 1OK127.0.0.1:6380> GET k"1"127.0.0.1:6380> HSEThash k v(integer) 1127.0.0.1:6380> HGEThash k"v"127.0.0.1:6380> PINGPONG
Strings | Lists | Hashes | Sets | Sorted Sets |
---|---|---|---|---|
append | lindex | hdel | sadd | zadd |
decr | llen | hexists | scard | zcard |
decrby | lpop | hget | sismember | zcount |
get | lpush | hgetall | smembers | zincrby |
getbit | lpushx | hincrby | spop | zpopmax |
getrange | lrange | hincrbyfloat | zpopmin | |
getset | lset | hkeys | zrange | |
incr | hlen | zrangebyscore | ||
incrby | hmget | zrank | ||
incrbyfloat | hmset | zrevrange | ||
mget | hscan | zrevrangebyscore | ||
mset | hset | zrevrank | ||
msetnx | hsetnx | zscore | ||
set | hstrlen | |||
setbit | hvals | |||
setex | ||||
setnx | ||||
setrange | ||||
strlen |
This benchmark running on my local mac,rekkles
should have better performance on SSD.
- redis:
$ redis-benchmark -p 6379 -c 50 -n 10000 -q PING_INLINE: 56497.18 requests per secondPING_BULK: 56818.18 requests per secondSET: 58823.53 requests per secondGET: 57142.86 requests per secondINCR: 59171.60 requests per secondLPUSH: 59523.81 requests per secondRPUSH: 57142.86 requests per secondLPOP: 59880.24 requests per secondRPOP: 52631.58 requests per secondSADD: 61728.39 requests per secondSPOP: 56497.18 requests per secondLPUSH (needed to benchmark LRANGE): 59880.24 requests per secondLRANGE_100 (first 100 elements): 19047.62 requests per secondLRANGE_300 (first 300 elements): 9074.41 requests per secondLRANGE_500 (first 450 elements): 6501.95 requests per secondLRANGE_600 (first 600 elements): 4933.40 requests per secondMSET (10 keys): 45871.56 requests per second
- rekkles:
$ redis-benchmark -p 6380 -c 50 -n 10000 -q PING_INLINE: 45662.10 requests per secondPING_BULK: 48543.69 requests per secondSET: 26881.72 requests per secondGET: 32051.28 requests per secondINCR: 30769.23 requests per secondLPUSH: 24937.66 requests per secondRPUSH: 38461.54 requests per secondLPOP: 24691.36 requests per secondRPOP: 39215.69 requests per secondSADD: 36496.35 requests per secondSPOP: 30120.48 requests per secondLPUSH (needed to benchmark LRANGE): 26954.18 requests per secondLRANGE_100 (first 100 elements): 8960.57 requests per secondLRANGE_300 (first 300 elements): 8045.05 requests per secondLRANGE_500 (first 450 elements): 8312.55 requests per secondLRANGE_600 (first 600 elements): 9049.77 requests per secondMSET (10 keys): 33670.04 requests per second