High availability

This page describes high availability for Cloud Memorystore for Redis instances in the Standard Tier. The Standard Tier provides high availability through replication and automatic failover capability. Cloud Memorystore for Redis does not use Redis Sentinel for high availability.

What high availability is

Cloud Memorystore for Redis provides high availability by replicating a master instance to a replica. A replica is a copy of the master that reflects changes to the master instance. Note: The replica is used only for enabling high availability. You cannot connect to the replica and use the replica as a read replica.

Each Cloud Memorystore for Redis instance in the Standard Tier is configured automatically as a master and replica pair. The replica serves as a standby and must be in a different zone than the master. Application requests are directed to the master instance. Changes made to the data on the master instance are copied to the replica using the Redis asynchronous replication protocol.

What high availability provides

If the master instance fails, the Cloud Memorystore for Redis service triggers a failover. The service promotes the replica to the master instance and, after recovery, configures the failed master as the replica of the new master.

To tolerate zone failures, the master instance and replica are located in different zones within the same region. Replication tolerates the loss of either the master instance or the replica at one time. If the master instance and replica fail at the same time due to multi-zone failure, data cannot be recovered.

When a failover is triggered

A failover occurs when the master Redis instance fails. During failover, all requests to the new master are redirected automatically to the replica, and the Cloud Memorystore for Redis instance continues to respond to your application.

How failover affects your applications

When a master instance fails over to the replica, existing connections to Cloud Memorystore for Redis are dropped. However, on reconnect, your application is redirected automatically to the new master instance using the same connection string or IP address. You do not need to update your application after a failover.

While the Cloud Memorystore for Redis service promotes the replica to master, your Cloud Memorystore for Redis instance is temporarily unavailable. Each node is located in a single zone, so zonal failures might cause prolonged recovery time. During this time, there is only one copy of the data.

How you view the status for high availability

You can see high availability metrics for your Redis instance by using Stackdriver. For information about the metrics that Stackdriver provides for Cloud Memorystore for Redis, see Monitoring Redis Instances. For more information about using Stackdriver with Google Cloud, see the Stackdriver Monitoring documentation.

To see the native replication status that Redis provides, you can issue the Redis INFO command to the Cloud Memorystore for Redis instance.

What's next

Was this page helpful? Let us know how we did:

Send feedback about...

Memorystore for Redis