Append only
redis.conf
dir /data
save ""
appendonly yes
appenddirname "appendonlydir"
appendfilename "appendonly.aof"
appendfsync everysec
aof-use-rdb-preamble yes
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mbappendfsync | Behavior |
|---|---|
everysec |
|
always |
|
no |
|
Files in Redis 7+
/data/appendonlydir/
├── appendonly.aof.1.base.rdb
├── appendonly.aof.1.incr.aof
└── appendonly.aof.manifestAutomatic rewrite
- AOF grows with every write; rewrite removes obsolete operations.
- With this config, rewrite starts above 64 MB after 100% growth since the previous rewrite.
- Rewrite uses CPU, memory, and disk I/O while retaining the old generation until the atomic switch.
Runtime status
INFO persistence| Signal | Effect |
|---|---|
aof_last_write_status is err | Redis rejects writes that require a healthy AOF |
aof_last_bgrewrite_status is err | Obsolete operations remain and AOF continues growing |
aof_rewrite_scheduled is 1 | Rewrite waits for another background persistence operation |
aof_delayed_fsync grows | Scheduled AOF fsync work exceeds storage throughput |
current_cow_size grows during rewrite | Copy-on-write increases process memory while the child exists |
