Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Loss in Redis Cluster After Deleting All Pods Due to IP Changes #1120

Open
captainpro-eng opened this issue Nov 4, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@captainpro-eng
Copy link

Issue: When all Redis pods in a Kubernetes cluster are deleted, data saved in the Append Only File (AOF) is lost upon restart. After the pods come up, Redis successfully loads the AOF, and the cluster state initially shows as "ok." However, soon after, the cluster state changes to "fail" due to IP address changes, leading to the removal of cached data.

Steps to Reproduce:

Deploy a Redis cluster using multiple pods in a Kubernetes environment.
Save data in Redis using AOF.
Gracefully shut down and delete all Redis pods simultaneously.
Allow the pods to restart automatically.
Observed Behavior:

After restarting, each Redis pod receives a new IP address.
Redis successfully loads the AOF and reports the cluster state as "ok."
Shortly thereafter, the cluster state changes to "fail" due to communication issues between nodes caused by the new IP addresses.
As a result, all cached data is lost when the cluster fails, even though the AOF file was loaded successfully at startup.
Expected Behavior:

The Redis cluster should retain data integrity and successfully recover from AOF without data loss, even after pod restarts and IP changes.
Nodes should be able to communicate effectively, maintaining the cluster state as "ok" after loading the AOF.

@captainpro-eng captainpro-eng added the bug Something isn't working label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant