SSDB is a high performace key-value(key-string, key-zset, key-hashmap) NoSQL persistent storage server, using Google LevelDB as storage engine.
SSDB's goal is to replace or co-work with Redis.
- LevelDB client-server support, written in C/C++
- Designed to store collection data
- Persistent key-value, key-zset, key-map('hashmap') storage
- Client API supports including C/C++, PHP, Python, Cpy, Java, nodejs, Ruby
- Online backup, fast recover
- Replication(master-slave), load balance [see wiki Replication]
- Future Features
- Distributed
<?php
require_once('SSDB.php');
$ssdb = new SimpleSSDB('127.0.0.1', 8888);
$resp = $ssdb->set('key', '123');
$resp = $ssdb->get('key');
echo $resp; // output: 123
$ wget --no-check-certificate https://github.com/ideawu/ssdb/archive/master.zip
$ unzip master
$ cd ssdb-master
$ make
$ #optional, install ssdb in /usr/local/ssdb
$ sudo make install
# start master
$ ./ssdb-server ssdb.conf
# or start as daemon
$ ./ssdb-server -d ssdb.conf
# start slave
$ ./ssdb-server ssdb_slave.conf
# ssdb command line
$ ./tools/ssdb-cli -p 8888
# stop ssdb-server
$ kill `cat ./var/ssdb.pid`
Total 1000 requests.
writeseq : 0.546 ms/op 178.7 MB/s
writerand : 0.519 ms/op 188.1 MB/s
readseq : 0.304 ms/op 321.6 MB/s
readrand : 0.310 ms/op 315.0 MB/s
View full SSDB vs Redis benchmark charts...
======= set =======
qps: 31852, time: 0.031 s
======= get =======
qps: 29103, time: 0.034 s
======= del =======
qps: 33042, time: 0.030 s
======= scan =======
qps: 25871, time: 0.039 s
======= rscan =======
qps: 31181, time: 0.032 s
======= zset =======
qps: 24352, time: 0.041 s
======= zget =======
qps: 27836, time: 0.036 s
======= zscan =======
qps: 10442, time: 0.096 s
======= zrscan =======
qps: 28224, time: 0.035 s
======= zdel =======
qps: 27137, time: 0.037 s
======= hset =======
qps: 31507, time: 0.032 s
======= hget =======
qps: 28388, time: 0.035 s
======= hscan =======
qps: 25319, time: 0.039 s
======= hrscan =======
qps: 30399, time: 0.033 s
======= hdel =======
qps: 29741, time: 0.034 s
See Benchmark
See Users wiki