ROR is a more cost-effective alternative to redis, uses RocksDB as the storage engine and can save about 2/3 of the cost.
ROR extends SWAP feature based on redis codebase, it is compatible with almost all redis commands (including lua and multi/exec) and redis replication (RDB +RESP).
- ubuntu
apt install libsnappy-dev zlib1g-dev libgflags-dev libstdc++6
- centos
yum install snappy-devel zlib-devel gflags-devel libstdc++
git clone https://github.com/ctripcorp/Redis-On-Rocks.git
git submodule upadate --init
cd redis
make
ROR stores hot and cold data in redis and RocksDB respectively, and exchanges hot and cold data automatically:
- SWAP IN: If key is cold, ROR reads cold key from RocksDB to redis, and then processes the command.
- SWAP OUT: If maxmemory is reached, ROR picks least frequently used key(LFU), and then writes the key to RocksDB.
ROR replication process is almost the same with redis, the only difference lies in RDB generation for cold data: RocksDB CHECKPOINT is obtained first, and then the cold data is scanned and converted into RDB format.