Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

ssdb

> 数据库
Open source

SSDB - A fast NoSQL database, an alternative to Redis

8.3K stars0 likes0 views
WebsiteGitHub

About

SSDB - A fast NoSQL database, an alternative to Redis

SSDB - A Redis compatible NoSQL database stored on disk

SSDB is a high performace key-value(key-string, key-zset, key-hashmap) NoSQL database, an alternative to Redis.

SSDB is stable, production-ready and is widely used by many Internet companies including QIHU 360.

Features

  • LevelDB client-server support, written in C/C++
  • Designed to store collection data
  • Persistent key-value, key-zset, key-map('hashmap'), key-list storage
  • Redis clients are supported
  • Client API supports including C++, PHP, Python, Cpy, Java, nodejs, Ruby, Go(see all)
  • Persistent queue service
  • Replication(master-slave), load balance
  • GUI administration tool(phpssdbadmin)
  • Built-in CLI nagios self-checks

PHP client API example

php
<?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

More...

Who's using SSDB?

SSDB users...

Documentation

  • View online
  • Contribute to SSDB documentation project

Compile and Install

bash
$ 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

# ssdb command line
$ ./tools/ssdb-cli -p 8888

# stop ssdb-server
$ ./ssdb-server ssdb.conf -s stop
 # for older version
$ kill `cat ./var/ssdb.pid`

See Compile and Install wiki

Performance

Typical performance

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

SSDB vs Redis

View full SSDB vs Redis benchmark charts...

Concurrency benchmark

========== set ==========
qps: 44251, time: 0.226 s
========== get ==========
qps: 55541, time: 0.180 s
========== del ==========
qps: 46080, time: 0.217 s
========== hset ==========
qps: 42338, time: 0.236 s
========== hget ==========
qps: 55601, time: 0.180 s
========== hdel ==========
qps: 46529, time: 0.215 s
========== zset ==========
qps: 37381, time: 0.268 s
========== zget ==========
qps: 41455, time: 0.241 s
========== zdel ==========
qps: 38792, time: 0.258 s

Run on a 2013 MacBook Pro 13 inch with Retina display.

Architecture

Windows executable

Download ssdb-server.exe from here: https://github.com/ideawu/ssdb-bin

SSDB library for iOS

make ios
# ls ios/
include/ libleveldb-ios.a libsnappy-ios.a libssdb-ios.a libutil-ios.a

Drag the static libraies files into your iOS project. Then add ios/include to your iOS project's Header Search Paths, which is set in Build Settings.

Links

  • Author's homepage
  • Cpy Scripting Language
  • Google LevelDB
  • Lua ssdb client driver for the ngx_lua
  • Yet another ssdb client for Python
  • SSDB 中文文档

Changes made to LevelDB

See Changes-Made-to-LevelDB wiki

LICENSE

SSDB is licensed under New BSD License, a very flexible license to use.

Authors

@ideawu([email protected])

Thanks

  • 刘建辉, [email protected]
  • wendal(陈镇铖), [email protected], http://wendal.net

Issues· 398 open

View all issuesOpen on GitHub
  • #1429

    域名ssdb.io已过期,分享个文档网址吧

    Updated Aug 12, 2026
  • #1431

    Build and Test for Linux/ARM64

    Updated Jun 3, 2026
  • #1430

    数据库文件损坏的原因是什么?

    Updated Jun 3, 2026
  • #185

    Completion of error handling

    Updated Dec 25, 2025
  • #1428

    Project SSDB is alive?

    Updated Oct 24, 2025
  • #238

    Implement publish, subscribe, blpop, brpop

    Updated May 13, 2024
  • #1427

    resp.cpp使用sprintf导致ssdb CoreDump

    Updated May 10, 2023
  • #1426

    配置不能在一行写注释

    Updated Apr 20, 2023
  • #1425

    构造Binlog对象时的seq参数为何没有进行大小端转换再写入,load的时候seq也没有进行转换?

    Updated Apr 19, 2023
  • #1386

    正常运行的ssdb,突然出现只能读取,不可写入的问题,然后过了一会也不能读取了

    Updated Jan 26, 2023

> Tags

C++leveldbnosql-databasesredisrocksdb

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库