1. What is kedis-server

Kedis-server is a persistent KV storage server that uses RocksDB as the storage engine, supports Redis protocol, and supports most commonly used Redis commands

Project address: kedis-server

2. What’s wrong with Redis

Overall, Redis is a very good in-memory KV storage server with very rich data structures and very good performance. However, when using Redis in practice, you still encounter the following problems:

  • The data capacity of a single Redis instance is limited by the size of the machine memory. In addition, the maxmemory of all single Redis instances should not exceed half of the machine memory due to the fork of a sub-process to obtain the snapshot of the memory during the active/standby Redis replication. Otherwise, swap will be used

  • If the Redis persistence function is enabled, restarting Redis with a large amount of data takes a long time because all the data needs to be loaded into memory

  • When the primary and secondary replication of Redis is disconnected and reconnected, only a small amount of historical data can be retained. If the disconnection lasts for a long time, a full data replication is required, which affects online services

3. Replace Redis in the Proxy mode based Redis Cluster solution with kedis-server

We made a proxy-based Redis Cluster solution, which is used to store KV storage business that is not eager for persistence. Then we want to replace Redis with a persistent version of redis storage server, so that a persistent version of KV storage cluster solution can be realized

4. Other redIS-like persistent storage schemes in the industry

SSDB and PIKA are the most widely used Redis persistent KV servers in China, but these two projects do not quite meet our requirements:

  • For SSDB, it uses a different network protocol than Redis, and the command is not quite the same as Redis. The storage engine also uses LevelDB, which is worse than RocksDB

  • For PIKA, Redis protocols and commands are used, but duplicate keys are allowed for different data types. However, Zset score does not support double and depends on a complex library

5. Features of keDIS-Server

  • Use RocksDB as the storage engine
  • Supports the Redis protocol and most common Redis commands
  • Master/slave replication supports both full and incremental replication modes. Binlog is used for incremental data synchronization
  • Zset score supports double, fully compatible with Redis command
  • Easy to compile, with a single command to compile the server
  • See the project documentation for more features