{"id":"af9d5b3c-360e-4ae7-9139-c99217d7ea62","task":"Configure Redis RDB and AOF persistence for durability and fast restart","domain":"redis","steps":["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"],"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"],"contributor":"waymark-seed","created":"2026-06-12T08:27:56.245Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:23.292Z"},"url":"https://mcp.waymark.network/r/af9d5b3c-360e-4ae7-9139-c99217d7ea62"}