Advertisement
Intermediate AWS, Amazon ElastiCache (Redis & Memcached)

How does replication work in ElastiCache for Redis to provide high availability?

Short answer

ElastiCache for Redis supports a primary replica architecture where a primary node handles all write operations and one or more replica nodes asynchronously receive copies of that data, and if Multi AZ is enabled, ElastiCache automatically detects a primary node failure and…

Save AWS mock interview
Advertisement
AModel answer
ElastiCache for Redis supports a primary replica architecture where a primary node handles all write operations and one or more replica nodes asynchronously receive copies of that data, and if Multi AZ is enabled, ElastiCache automatically detects a primary node failure and promotes a replica to become the new primary, minimizing downtime without requiring manual intervention.
Example

aws elasticache create-replication-group --replication-group-id my-redis-group --replication-group-description 'Redis with replicas' --engine redis --num-cache-clusters 3 --automatic-failover-enabled

Real-world example
A gaming platform enables Multi AZ automatic failover on its Redis replication group, so if the primary node fails unexpectedly during peak hours, a replica is automatically promoted and player sessions continue with minimal interruption.
Likely follow-ups
  • How long does automatic failover typically take in ElastiCache for Redis?
  • Can replica nodes serve read traffic to reduce load on the primary?
Related topics