High availability for Memorystore for Redis Stay organized with collections Save and categorize content based on your preferences.
This page describes high availability (HA) for Memorystore for Redis instances inthe Standard Tier.
The Standard Tier protects a Redis instance from common failures by replicatingdata to one or more replicas, and by providing fast, automatic failover to areplica.
A Standard Tier instance that has thereadReplicaMode setting deactivatedcontains a primary instance and a replica that provides HA functionality. AStandard Tier instance that has this setting enabled has a primary instance andone to five read replicas. The read replicas in this configuration perform readsas well as provide failover support for HA functionality. To determine whetherthereadReplicaModesetting is deactivated or enabled, seeView read replica information for your instance.
Memorystore for Redis provides high availability by replicating a primaryinstance to one or more replicas. Memorystore for Redis uses theasynchronous replication protocol tocopy any changes that you make to the data on the primary instance to thereplicas. Because of the asynchronous nature of replication, and depending onthe write rate of the primary instance, replicas can lag behind the instance.
If the primary instance fails, then the instance fails over automatically to areplica. For instances that have more than one replica, the instance failsover automatically to a healthy replica with the least replication lag.

If you configure an instance to have only one non-read replica, thenMemorystore for Redis directs all application connections to the primaryendpoint. If you configure the instance to use read replicas, then applicationscan also use the read endpoint to distribute read queries across all replicas.
When a failover occurs
A failover occurs when the primary instance fails. During a failover, theprimary instance and read endpoint redirect automatically to the new primaryinstance and replicas. Memorystore for Redis drops all connections to theprimary endpoint. Memorystore for Redis also drops read endpoint connections tothe read replica that's promoted.
How a failover affects your application
When the primary instance fails over to the replica, Memorystore for Redisdrops existing connections to the primary endpoint of the instance. The instanceis unavailable for an average of 30 seconds during automated repairs, and 15seconds for maintenance events. Upon reconnection, your application isredirected automatically to the new primary instance by using the sameconnection string or IP address. You don't need to update your application aftera failover.
During a failover, if there are connections to the read endpoint, thenMemorystore for Redis drops the connections to the replica that's beingpromoted to the primary instance. Memorystore for Redis continues to serve theconnections to the other replicas. After the failover is complete and the newreplica is available, Memorystore for Redis redirects connections to the newreplica.
Note: Because of the asynchronous nature of the Redis replication protocol,acknowledged writes might be lost during a failover. Your applications must beable to tolerate losing acknowledged writes.Retry the instance connection after a failover
When a failover happens, Memorystore for Redis drops all connections from theprimary endpoint. Depending on the number of replicas, Memorystore for Redismight also drop some read connections.
Because of this connection loss, your application must retry to reestablish theconnection. We recommend that the retry logic use exponential backoff to ensurethat you don't overload your instance with too many retry requests. In additionto including retry logic, we recommend that you test how a failover affects yourapplication by testing the application with amanual failover.
Note: If you have primary instances that have read replicas enabled, thenMemorystore for Redis doesn't support the manual failover API.Most Redis clients have built-in retry capabilities. If a connection drop occursbecause of a failover, then we recommend that you use these retry capabilities.
A failover occurs when you perform the following tasks:
- Scale your instance
- Upgrade the Redis version of an instance
- Initiate a manual failover
- Perform a maintenance update
If you implement retry logic in your application to handle connection dropsbecause of failovers, then your instance probably won't see a significantperformance impact.
View the status for high availability
You can see high availability metrics for your Redis instance by usingCloud Monitoring. For information about the metrics thatCloud Monitoring provides for Memorystore for Redis, seeMonitor Redis Instances andSupported monitoring metrics for Memorystore for Redis.
To see the built-in replication status that Redis provides, use theINFOcommand.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-19 UTC.