Version upgrade behavior

This page describes how your Memorystore instance behaves during a version upgrade operation, how an upgrade operation can affect your application, and when you should run an upgrade operation. To learn how to upgrade an instance's Redis version, see Upgrading an instance's Redis version.

Depending on the instance's tier, running a version upgrade operation can have performance and storage implications for your application. There are also some limitations to upgrading instances based on the amount of memory that is currently in use.

Best practices for upgrading an instance's Redis version

  • We recommend exporting your instance data before running a version upgrade operation.

  • For Standard Tier instances, to increase the speed and reliability of your version upgrade operation, upgrade your instance during periods of low instance traffic. To learn how to monitor instance traffic, see Monitoring Redis instances.

  • When upgrading a Standard Tier instance, keep the instance write load to a minimum. A high write load can cause upgrade operations to take significantly longer, and can cause upgrades to fail.

Basic Tier instance upgrade behavior

Basic Tier instances block reads and writes while the version upgrade operation is ongoing. After the upgrade operation completes, all data is flushed from the cache.

Standard Tier instance upgrade behavior

Standard Tier instances do not experience a cache flush during a version upgrade operation. During an upgrade operation, the replica node is upgraded first, then synced with the primary node. Once the new replica has caught up with the new primary, the new primary performs a second failover to the new replica. During the failover, connections to the instance are terminated. Applications should incorporate retry logic in the code to be able to reconnect to the new primary. Finally, the original primary instance's Redis version is upgraded.

After the version upgrade operation completes, there may be stale or inconsistent data in the cache because of the asynchronous nature of Redis replication. Your application should be resilient enough to handle inconsistencies that arise during an upgrade operation.

Expired keys

When you upgrade a Standard Tier instance, expired keys are not synced. If you have expired keys in your Redis instance before you upgrade, you will have fewer keys after the upgrade operation completes.