I’m wondering about different approaches for maintaining data persistence when using Redis as a checkpoint storage solution. I’ve encountered situations where Redis goes down unexpectedly before it can perform its automatic RDB backup or append-only file operations. This resulted in losing several minutes worth of checkpoint data. Has anyone found effective ways to handle this reliability issue? I’m trying to figure out if there are better configuration options or if most people just live with this potential data loss risk when using Redis for checkpointing.
Been dealing with this exact problem for years. The key is tuning your persistence settings instead of relying on defaults.
First thing - adjust your save directive. I usually go with something like save 60 100 which saves every 60 seconds if at least 100 keys changed. Way more frequent than the default.
For AOF, enable it with appendonly yes and set appendfsync everysec. This gives you at most 1 second of data loss instead of minutes. The performance hit is minimal in most cases.
Here’s what really helped me though - use both RDB and AOF together. Redis can reconstruct from either, so you get double protection. Set aof-use-rdb-preamble yes to get the best of both worlds.
Also consider Redis Sentinel or Redis Cluster if you need higher availability. We switched to a 3-node setup and haven’t lost checkpoint data since.
This video covers the persistence options really well and shows the Docker setup too:
One last tip - monitor your Redis logs. You’ll see exactly when saves happen and can tune accordingly.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.