gitmyhub

ssdb

C++ ★ 8.3k updated 3y ago

SSDB - A fast NoSQL database, an alternative to Redis

SSDB is a disk-based database that works like Redis but stores data on disk instead of RAM, supporting strings, sorted sets, hashmaps, and lists with Redis-compatible client libraries.

C++Redis protocolsetup: hardcomplexity 3/5

SSDB is a database for storing and retrieving data quickly. It works similarly to Redis, a popular in-memory database, but with one key difference: SSDB stores everything on disk rather than in RAM. That means your data survives restarts and you are not limited by how much memory your server has.

The project supports several ways to organize data, not just simple key-value pairs. You can store plain strings, sorted lists called zsets, hashmaps (which work like dictionaries), and regular lists. This makes it flexible enough to handle counters, leaderboards, queues, and structured records without needing multiple database systems.

Because SSDB speaks the same protocol as Redis, most Redis client libraries work with it directly. That means if you already have code that talks to Redis, switching to SSDB is largely a matter of pointing it at a different server address. Client libraries are available for C++, PHP, Python, Java, Node.js, Ruby, and Go, among others.

SSDB includes replication support, which lets you run a master server and one or more read-only copies for load distribution and redundancy. It also ships with a command-line tool for querying the database interactively and supports a GUI administration interface called phpssdbadmin. Built-in health-check commands are included so monitoring tools can verify the server is running correctly.

The software is written in C++ and compiles on Linux, BSD, macOS, and Windows. Performance figures from the README show it processing tens of thousands of operations per second on modest hardware. The project was used in production by several large Chinese internet companies. It is released under the New BSD license, which places very few restrictions on use or redistribution.

Where it fits