SSDB is key-value(zset, hash, list) storage server, with Google LevelDB as storage engine, its goal is to replace Redis when encounter large sum of data that won’t fits the server’s memory.
SSDB Docs:

SSDB’s main features:

  • Uses Google LevelDB as storage engine
  • Master-slave replication, recover from break point after network failure
  • Online backup through network
  • Very suitable for storing collection data
  • Uses small RAM


$ssdb = new SimpleSSDB('', 8888);
$resp = $ssdb->set('key', '123');
$resp = $ssdb->get('key');
echo $resp; // output: 123


SSDB vs Redis

SSDB vs Redis

Views: 24248

50 Responses to "SSDB"

  • First – thanks! – amazing project!

    I was a little confused by – does this mean that redis clients sending a zScore (for example) would not work since the SSDB command seems to be called zget? If not, why give it different names – does it do something different?

    Its confusing to have something that is so close to redis, claims to be a redis replacement, but then uses different function calls for the same thing (even if they are really aliased.)

    Can you explain more of why you gave the same redis commands different names? Reply
    @Yehosef: Hi, I think zget is better than zscore, because we have get/hget/qget, for the reason of consistency, it should be zget, not zscore. Reply
    Thanks for the explanation – I understand better now. I’m not sure if I agree because is it’s not the same thing. The relationship between a key and value with a key-value isn’t the same relationship as a member and score in a zset (at least in redis, maybe in ssdb it’s the same), though superficially they look the same. The data structures and use cases are different (eg, in zset the score can only be numbers)

    I guess what seems odd is that you’re trying to make a redis replacement and then renaming the functions. If it did something else, I can hear. But to change it because you think zget makes more sense, makes less sense and makes it more confusing. Is it at least aliased so that zScore will work?

    The same is true of the q* naming – read – – for a reference – a queue is made to only access the ends – a list can access the ends or ranges in the middle. makes no sense if it’s a queue. Reply
  • Is there a way to determine the number of keys set in SSDB? Reply
    @Russ Jones: No easy way except scanning the whole db. If you have this demand, save all key-values in exactly one hashmap, then use hsize command to get the number of keys in it. Reply
  • 请问一下,ssdb支持分布式和跨机房同步吗? Reply
    @linbo: SSDB 支持跨机房同步, 只要网络是通的状况良好. SSDB 不提供现成的分布式方案, 需要使用者自己部署多个实例, 自己根据业务特点将数据分布到不同的实例上. Reply
  • Hi,

    Does SSDB persist data from memory to disk as well?

    I think it’s not quite clear how it’s working in common, generally the way I can think of: stores the data in memory, persists to disk as well as ability to use replica nodes?

    Thanks. Reply
    @Vadim: Yes, SSDB persist data to disk. It uses the famous storage engine LevelDB from Google. Reply
  • Hi

    Let me introduce you this module for SSDB and vert.

    Thank you for the great job. Reply
    @jpv: Good job! Reply
  • 为什么不选用rocksdb 作为引擎 Reply
  • 我想请教一下关于同步mirror与sync的区别。
    if(type == BinlogType::MIRROR && this->is_mirror){
    if(this->last_seq – this->last_noop_seq >= 1000){
    return 1;
    请问下,这个是怎么考虑的呢? Reply
  • 相当不错,但是不能100%的兼容REDIS协议这个问题太严重了。这就意味着大量的成熟可靠的REDIS CLIENT 不能用了。管理工具也不能用了。 Reply
    @GOOD: Hi, 不能100%兼容还是可以使用的. 比如很多人就使用 phpredis, jedis 等 Redis 的库来连接 ssdb. Reply

« [1][2][3][4] » 2/4

Leave a Comment