Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Redis Cache service lost all data

I have a Redis cache service in azure. I put my data with hand for testing after a while (2 or 3 weeks later) my all data getting lost so i put my data again and again it happened 3-4 times. My redis data

TTL number is -1 do you have any idea. Is there any reason for lost data.By the way, I didnt restart. My Redis service Basic tier

like image 802
sonertbnc Avatar asked Jan 27 '23 19:01

sonertbnc


2 Answers

The Basic pricing tier is a single instance system and has no persistence or Replication. As such, if there is any type of hardware failure or if the OS is patched, then the system will lose data because of the lack of replication. There is also no SLA for Basic Tier.

If you want data replication, then you will need to chose at least the Standard tier, which is a two-node system and data is automatically replicated from the master node to the slave node. If one node goes down for any reason, the other node automatically takes over as master.

I wrote an article that talks about different types of data loss that can happen in any Redis environment.

like image 200
JonCole Avatar answered Feb 01 '23 14:02

JonCole


Redis FAQ says:

Redis Data Persistence: The Premium tier allows you to persist the cache data in an Azure Storage account. In a Basic/Standard cache, all the data is stored only in memory. If there are underlying infrastructure issues there can be potential data loss. We recommend using the Redis data persistence feature in the Premium tier to increase resiliency against data loss. Azure Redis Cache offers RDB and AOF (coming soon) options in Redis persistence. For more information, see How to configure persistence for a Premium Azure Redis Cache.

So my guess would be - sometimes underlying servers are rebooted.

like image 35
4c74356b41 Avatar answered Feb 01 '23 14:02

4c74356b41