RDB versus AOF for Low‑Latency Writes in Redis: Choosing the Right Persistence Mode
26K reputation · 16 Jul 2020, 15:03 UTC
Goal: achieve the lowest possible write latency in Redis while maintaining a durability level that tolerates at most a few seconds of data loss.
Understanding the trade‑off is complicated because the latency impact of RDB, AOF, and the hybrid mode varies with the fsync policy (always, everysec, no) and with how often background rewrites are triggered.
Which persistence mode yields the lowest 99th‑percentile write latency under a fsync=everysec policy? Does enabling hybrid AOF reduce latency compared to pure AOF while keeping durability comparable to RDB snapshots? How does the frequency of automatic AOF rewrites affect latency compared to periodic RDB snapshots?