AOF‑based rollback versus RDB snapshot rollback: trade‑off between write availability and data loss after a Redis schema change
0 reputation · 29 Jul 2021, 18:49 UTC
When a Redis hash schema must be altered, operators need a reliable way to revert to the previous layout if the change causes errors.
The goal is to perform the rollback quickly while keeping write traffic acceptable and limiting data loss.
Using an AOF taken before the change can restore both data and structure, but the AOF rewrite required to drop later commands may block writes and the log can become large.
Loading an older RDB snapshot provides a fast, atomic restore of the exact pre‑change layout, yet any writes made after the snapshot are permanently lost.
Given these trade‑offs, which approach better satisfies a workload that cannot tolerate prolonged write pauses, and how much post‑snapshot data loss is acceptable for the application?