This page describes how your Memorystore for Redis Cluster instance behaves during scaling.
You can scale the capacity for your instance in the following ways:
You can change the number of shards for your instance. This is horizontal scaling. You can scale an instance horizontally in one of the following ways:
Scale out: increase the capacity of your instance, which gives the instance more memory and processing power to handle a larger volume of data or traffic. Your instance's capacity is determined by the number of shards in your instance.
By scaling your instance out, your application can handle an increased demand without performance degradation. To scale an instance out, add shards to the instance.
Scale in: reduce the capacity of your instance, which decreases both the processing power and the amount of memory available to store data. This occurs when your application's data demands decrease and you need to lower your resource usage to save costs. To scale an instance in, reduce the number of shards in the instance.
You can change the node type for your instance. This is vertical scaling. You can scale an instance vertically in one of the following ways:
- Scale up: increase the capacity of your instance. Your instance's
capacity is determined by your instance's node type. To scale an instance up,
change the node type to a larger node type. For example, scale your instance
up from a
redis-standard-small
node type to aredis-highmem-medium
node type. Scale down: reduce the capacity of your instance. To scale an instance down, change the node type to a smaller node type. For example, scale your instance down from a
redis-highmem-medium
node type to aredis-standard-small
node type.
- Scale up: increase the capacity of your instance. Your instance's
capacity is determined by your instance's node type. To scale an instance up,
change the node type to a larger node type. For example, scale your instance
up from a
Impact of scaling
During a scaling operation, the availability of your instance isn't impacted. However, when you change the number of shards in your instance, Memorystore for Redis Cluster rebalances the instance's keyspace. This might cause increased latency during the scaling operation.
Also, the impact of scaling your instance vertically by changing the node type is similar to what happens with a maintenance operation.
Failure scenarios
If you encounter an error during the scaling operation, then it's likely because of one of the following scenarios:
- You scaled to a smaller shard count that doesn't have the capacity to hold all of the keys that Memorystore for Redis Cluster stores in the original instance. To resolve this, scale to a larger shard count that can hold all of the stored keys.
- You scaled to a smaller node type that doesn't have the capacity to hold all of the data that Memorystore for Redis Cluster stores in the original node type. If this occurs, then Memorystore for Redis Cluster provides you with a recommended node type to scale down vertically.
- You updated the node type for your instance and either you overwrite the default settings for the original node type or these settings are overwritten already. However, the new, scaled node type either doesn't support the values for the default settings or the settings aren't valid for the node type. If this occurs, then Memorystore for Redis Cluster returns an error. To resolve this, modify the settings manually so that they're valid for the new node type.
- You scaled your instance during a period of high write pressure (for example, during load testing). To resolve this, scale during periods of low instance traffic.
Best practices
To help you scale the capacity for your instance, and to increase the speed and reliability of scaling your instance, scale it during low periods of traffic, whenever you can. To learn how to monitor instance traffic, see Monitor instances.