Redis RDB vs AOF Is Really an RPO Decision
RDB and AOF are not just file formats. They encode how much acknowledged state you are willing to lose, how much persistence overhead you accept, and how recovery should work.
REDIS / DATA SYSTEMS
Production notes on the parts of Redis that become interesting after GET and SET: memory pressure, eviction semantics, hot keys, clustering, persistence, Streams, failover, caching and atomic server-side logic.
RDB and AOF are not just file formats. They encode how much acknowledged state you are willing to lose, how much persistence overhead you accept, and how recovery should work.
A producer can time out after XADD without knowing whether Redis accepted the entry. Redis 8.6 adds stream idempotency so retries can be recognized without creating duplicate entries.
Consumer groups do not make a stream entry disappear when it is delivered. Until XACK succeeds, Redis tracks it as pending, which is what makes crashed-consumer recovery possible.
Redis Cluster spreads hash slots across shards, not one key across shards. A single extremely popular key can saturate the shard that owns it while the rest of the cluster is mostly idle.
Redis replication is asynchronous by default. WAIT reduces the risk window, but replica acknowledgements do not turn Sentinel or Cluster failover into a strongly consistent system.
Lua scripts and Redis Functions avoid races and network round trips by executing atomically on the server. The same property means long-running server-side code blocks unrelated work.
When Redis reaches maxmemory, the eviction policy decides which data may disappear or whether new writes should fail. That makes memory configuration part of application correctness.
Allocator fragmentation, active pages, copy-on-write during forks, and persistence work can make process RSS diverge from the logical size of the Redis dataset.
Hash tags let related keys share one slot so multi-key commands and scripts can remain atomic. Overuse them and you can create hot slots that undo the cluster's distribution.
When a popular key expires, many callers can observe the same miss and rebuild the value simultaneously. Stampede protection is admission control for the source of truth.
Queues let producers and workers move at different speeds for a while, but a queue that keeps growing is accumulating work debt against the future. More waiting space does not create more processing capacity.