In redis.conf enable RDB snapshots with save directives (e.g., save 3600 1 meaning save after 3600 seconds if at least 1 key changed) and set dbfilename dump.rdb with a full dir path
Enable AOF: set appendonly yes, appendfilename appendonly.aof, and appendfsync everysec (flushes WAL to disk every second; at most one second of data loss on crash)
Enable hybrid persistence with aof-use-rdb-preamble yes — the AOF file begins with an RDB snapshot followed by incremental AOF commands, giving fast restart from the RDB preamble with near-real-time durability from AOF replay
Set auto-aof-rewrite-percentage and auto-aof-rewrite-min-size to trigger automatic AOF rewrites that compact the file; run BGREWRITEAOF manually if the AOF grows unexpectedly large
For replicas, configure the primary's repl-diskless-sync yes to stream RDB over the network without writing to disk on the primary, reducing primary disk I/O during full sync
Test recovery: stop Redis, delete the RDB and let it reload from AOF only, or vice versa; verify data completeness before relying on the configuration in production
Known gotchas
appendfsync always provides the strongest durability (fsync on every write) but severely reduces throughput; appendfsync everysec is the standard production trade-off — appendfsync no offloads fsync to the OS and can lose more data on crash
If both RDB and AOF files exist on startup, Redis loads the AOF by default (since it is more complete); ensure the AOF is not corrupted — use redis-check-aof --fix if Redis refuses to start
RDB snapshots are written by a forked child process; on a large dataset, the fork can cause a noticeable latency spike due to copy-on-write memory pressure — schedule BGSAVE during off-peak hours or use diskless replication
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp