Skip to content

Redis Differences

FrogDB is wire-compatible with Redis via RESP2/RESP3. Any Redis client library works without modification. This page documents only the differences — for standard Redis behavior, see the Redis documentation.

This page compares FrogDB 0.1.0 against Redis 8.x (open-source).

Redis 8.xFrogDB
ThreadingSingle-threaded command processing (I/O threads for socket reads/writes)Shared-nothing multi-threaded (sharded workers)
Storage engineIn-memory with RDB/AOFIn-memory with RocksDB WAL
Cluster coordinationGossip protocolRaft consensus with orchestrated control plane
Configuration formatredis.conf (custom)frogdb.toml (TOML)
Allocatorjemallocjemalloc
Lua version5.15.4

FrogDB uses RocksDB instead of RDB/AOF. This means:

  • No RDB/AOF files — data is stored in RocksDB SST files with a WAL
  • No SAVE/BGSAVE semantics — use BGSAVE to trigger a forkless snapshot (no fork() overhead)
  • No BGREWRITEAOF — RocksDB manages WAL compaction automatically
  • Durability modes: async, periodic, sync (not appendfsync always/everysec/no)
  • RDB files from Redis cannot be imported directly

See Persistence for configuration details.

FrogDB uses TOML instead of redis.conf. Key mappings:

redis.conffrogdb.toml
bind 0.0.0.0server.bind = "0.0.0.0"
port 6379server.port = 6379
requirepass secretsecurity.requirepass = "secret"
maxmemory 1gbmemory.maxmemory = 1073741824
maxclients 10000server.max-clients = 10000
appendonly yespersistence.enabled = true
appendfsync everysecpersistence.durability-mode = "periodic"
save 900 1snapshot.snapshot-interval-secs = 900

Environment variables use FROGDB_ prefix with double underscores for nesting: FROGDB_SERVER__PORT=6380.

See Configuration Reference for all options.

FrogDB uses Raft consensus instead of Redis Cluster’s gossip protocol:

  • Orchestrated control plane — no CLUSTER MEET, topology managed via admin API
  • Raft-based leader election — deterministic failover, no split-brain
  • Two-level sharding — cluster hash slots (16384) mapped to internal shard workers
  • CLUSTER BUMPEPOCH is not supported
  • Replica migration is manual (not automatic)

See Clustering for details.

FrogDB partitions keys across internal shards (even in standalone mode). This affects multi-key operations.

Multi-key commands (MGET, MSET, etc.) require all keys to hash to the same slot, or they return -CROSSSLOT. This applies in cluster mode. In standalone mode, cross-slot operations work by default via scatter-gather.

Set server.allow-cross-slot-standalone = true to explicitly allow cross-slot operations in standalone mode.

  • MULTI/EXEC requires all keys within the same hash slot (cluster mode)
  • In standalone mode, cross-shard transactions use VLL for atomicity
  • WATCH uses per-key version tracking
  • BLPOP, BRPOP, BLMOVE etc. require all keys on the same shard
  • Cross-shard blocking returns -CROSSSLOT

FrogDB enforces that all keys accessed in a script are declared via KEYS[]. Accessing undeclared keys returns an error (Redis allows this but discourages it).

-- This works
EVAL "return redis.call('GET', KEYS[1])" 1 mykey
-- This errors in FrogDB (works in Redis)
EVAL "return redis.call('GET', 'mykey')" 0

All keys in a script must hash to the same shard. Multi-shard scripts are not supported.

  • redis.setresp() is not supported
  • Lua 5.4 (not 5.1) — minor syntax differences for edge cases

Standard PUBLISH/SUBSCRIBE and pattern subscriptions (PSUBSCRIBE) work identically to Redis.

Differences in cluster mode:

  • Regular PUBLISH: broadcasts to all cluster nodes, same as Redis
  • Sharded Pub/Sub (SSUBSCRIBE/SPUBLISH): messages are routed to the shard owning the channel’s hash slot, consistent with Redis Cluster behavior
  • Subscription limits: configurable via blocking.max-subscriptions-per-client (Redis has no built-in per-client limit)
  • Cluster-wide fan-out: regular Pub/Sub messages are forwarded across cluster nodes so subscribers on any node receive them

In standalone mode, Pub/Sub behavior is identical to Redis.

FrogDB uses a single database (db0). SELECT with non-zero index returns an error. MOVE and SWAPDB are not supported.

Command/FeatureReason
SELECT (non-zero)Single database model
MOVE, SWAPDBSingle database model
MODULE *No module architecture
CONFIG REWRITEChanges via CONFIG SET are transient
BGREWRITEAOFRocksDB manages WAL lifecycle
SYNCLegacy; use PSYNC
DEBUG SEGFAULT/RELOAD/CRASH-AND-RECOVERUnsafe debug subcommands disabled
redis.setresp() in LuaNot implemented
Diskless replicationNot yet supported

FrogDB supports two-tier hot/warm storage as an alternative to eviction. When memory pressure occurs with the tiered-lru or tiered-lfu eviction policies:

  1. Instead of deleting keys, FrogDB serializes values to RocksDB (the “warm” tier)
  2. The key metadata remains in memory, but the value is stored on disk
  3. Reads transparently deserialize the value back to memory (promotion)

This requires persistence.enabled = true and a tiered-lru or tiered-lfu eviction policy. See Configuration Reference for settings.

No Redis equivalent — open-source Redis only supports eviction (keys are deleted when memory is full). Redis Enterprise offers a commercial “Auto Tiering” feature that tiers data between DRAM and NVMe, but this is not available in open-source Redis.