Scaling clusters for Valkey or Redis OSS (Cluster Mode Disabled)
Valkey or Redis OSS (cluster mode disabled) clusters can be a single-node cluster with 0 shards or multi-node clusters with 1 shard. Single-node clusters use the one node for both reads and writes. Multi-node clusters always have 1 node as the read/write primary node with 0 to 5 read-only replica nodes.
Action | Valkey or Redis OSS (cluster mode disabled) | Valkey or Redis OSS (cluster mode enabled) |
---|---|---|
Scaling in |
Scaling clusters in Valkey or Redis OSS (Cluster Mode Enabled) |
|
Scaling out |
Online resharding for Valkey or Redis OSS (cluster mode enabled) |
|
Changing node types |
To a larger node type: |
|
Changing the number of node groups |
Not supported for Valkey or Redis OSS (cluster mode disabled) clusters |
Scaling clusters in Valkey or Redis OSS (Cluster Mode Enabled) |
Contents
Scaling single-node clusters for Valkey or Redis OSS (Cluster Mode Disabled)
Valkey or Redis OSS (cluster mode disabled) nodes must be large enough to contain all the cache's data plus the Valkey or Redis OSS overhead. To change the data capacity of your Valkey or Redis OSS (cluster mode disabled) cluster, you must scale vertically; scaling up to a larger node type to increase data capacity, or scaling down to a smaller node type to reduce data capacity.
The ElastiCache scaling up process is designed to make a best effort to retain your existing data and requires successful Valkey or Redis OSS replication. For Valkey or Redis OSS (cluster mode disabled) clusters, we recommend that sufficient memory be made available to Valkey or Redis OSS.
You cannot partition your data across multiple Valkey or Redis OSS (cluster mode disabled) clusters. However, if you only need to increase or decrease your cluster's read capacity, you can create a Valkey or Redis OSS (cluster mode disabled) cluster with replica nodes and add or remove read replicas. To create a Valkey or Redis OSS (cluster mode disabled) cluster with replica nodes using your single-node Valkey or Redis OSS cache cluster as the primary cluster, see Creating a Valkey (cluster mode disabled) cluster (Console).
After you create the cluster with replicas, you can increase read capacity by adding read replicas. Later, if you need to, you can reduce read capacity by removing read replicas. For more information, see Increasing read capacity or Decreasing read capacity.
In addition to being able to scale read capacity, Valkey or Redis OSS (cluster mode disabled) clusters with replicas provide other business advantages. For more information, see High availability using replication groups.
Important
If your parameter group uses reserved-memory
to set aside memory for Valkey or Redis OSS overhead, before you begin scaling be sure that you have a custom parameter group that reserves the correct amount of memory for your new node type. Alternatively, you can modify a custom parameter group so that it uses reserved-memory-percent
and use that parameter group for your new
cluster.
If you're using reserved-memory-percent
, doing this is not
necessary.
For more information, see Managing reserved memory for Valkey and Redis OSS.
Topics
Scaling up single-node Valkey or Redis OSS clusters
When you scale up a single-node Valkey or Redis OSS cluster, ElastiCache performs the following process, whether you use the ElastiCache console, the Amazon CLI, or the ElastiCache API.
A new cache cluster with the new node type is spun up in the same Availability Zone as the existing cache cluster.
The cache data in the existing cache cluster is copied to the new cache cluster. How long this process takes depends upon your node type and how much data is in the cache cluster.
Reads and writes are now served using the new cache cluster. Because the new cache cluster's endpoints are the same as they were for the old cache cluster, you do not need to update the endpoints in your application. You will notice a brief interruption (a few seconds) of reads and writes from the primary node while the DNS entry is updated.
ElastiCache deletes the old cache cluster. You will notice a brief interruption (a few seconds) of reads and writes from the old node because the connections to the old node will be disconnected.
Note
For clusters running the r6gd node type, you can only scale to node sizes within the r6gd node family.
As shown in the following table, your Valkey or Redis OSS scale-up operation is blocked if you have an engine upgrade scheduled for the next maintenance window. For more information on Maintenance Windows, see Managing ElastiCache cluster maintenance.
Pending Operations | Blocked Operations |
---|---|
Scale up | Immediate engine upgrade |
Engine upgrade | Immediate scale up |
Scale up and engine upgrade |
Immediate scale up |
Immediate engine upgrade |
If you have a pending operation that is blocking you, you can do one of the following.
-
Schedule your Valkey or Redis OSS scale-up operation for the next maintenance window by clearing the Apply immediately check box (CLI use:
--no-apply-immediately
, API use:ApplyImmediately=false
). -
Wait until your next maintenance window (or after) to perform your Valkey or Redis OSS scale up operation.
-
Add the Valkey or Redis OSS engine upgrade to this cache cluster modification with the Apply Immediately check box chosen (CLI use:
--apply-immediately
, API use:ApplyImmediately=true
). This unblocks your scale up operation by causing the engine upgrade to be performed immediately.
You can scale up a single-node Valkey or Redis OSS (cluster mode disabled) cluster using the ElastiCache console, the Amazon CLI, or ElastiCache API.
Important
If your parameter group uses reserved-memory
to set aside memory for Valkey or Redis OSS overhead, before you begin scaling be sure that you have a custom parameter
group that reserves the correct amount of memory for your new node type.
Alternatively, you can modify a custom parameter group so that it uses
reserved-memory-percent
and use that parameter group for your
new cluster.
If you're using reserved-memory-percent
, doing this is not necessary.
For more information, see Managing reserved memory for Valkey and Redis OSS.
Scaling up single-node clusters for Valkey or Redis OSS (Cluster Mode Disabled) (Console)
The following procedure describes how to scale up a single-node Valkey or Redis OSS cluster using the ElastiCache Management Console. During this process, your Valkey or Redis OSS cluster will continue to serve requests with minimal downtime.
To scale up a single-node Valkey or Redis OSS cluster (console)
-
Sign in to the Amazon Web Services Management Console and open the ElastiCache console at https://console.amazonaws.cn/elasticache/
. -
From the navigation pane, choose Valkey or Redis OSS clusters.
-
From the list of clusters, choose the cluster you want to scale up (it must be running the Valkey or Redis OSS engine, not the clustered Valkey or Redis OSS engine).
-
Choose Modify.
-
In the Modify Cluster wizard:
-
Choose the node type you want to scale to from the Node type list.
-
If you're using
reserved-memory
to manage your memory, from the Parameter Group list, choose the custom parameter group that reserves the correct amount of memory for your new node type.
-
-
If you want to perform the scale up process right away, choose the Apply immediately box. If the Apply immediately box is not chosen, the scale-up process is performed during this cluster's next maintenance window.
-
Choose Modify.
If you chose Apply immediately in the previous step, the cluster's status changes to modifying. When the status changes to available, the modification is complete and you can begin using the new cluster.
Scaling up single-node Valkey or Redis OSS cache clusters (Amazon CLI)
The following procedure describes how to scale up a single-node Valkey or Redis OSS cache cluster using the Amazon CLI. During this process, your Valkey or Redis OSS cluster will continue to serve requests with minimal downtime.
To scale up a single-node Valkey or Redis OSS cache cluster (Amazon CLI)
-
Determine the node types you can scale up to by running the Amazon CLI
list-allowed-node-type-modifications
command with the following parameter.--cache-cluster-id
For Linux, OS X, or Unix:
aws elasticache list-allowed-node-type-modifications \ --cache-cluster-id
my-cache-cluster-id
For Windows:
aws elasticache list-allowed-node-type-modifications ^ --cache-cluster-id
my-cache-cluster-id
Output from the above command looks something like this (JSON format).
{ "ScaleUpModifications": [ "cache.m3.2xlarge", "cache.m3.large", "cache.m3.xlarge", "cache.m4.10xlarge", "cache.m4.2xlarge", "cache.m4.4xlarge", "cache.m4.large", "cache.m4.xlarge", "cache.r3.2xlarge", "cache.r3.4xlarge", "cache.r3.8xlarge", "cache.r3.large", "cache.r3.xlarge" ] "ScaleDownModifications": [ "cache.t2.micro", "cache.t2.small ", "cache.t2.medium ", "cache.t1.small ", ], }
For more information, see list-allowed-node-type-modifications in the Amazon CLI Reference.
-
Modify your existing cache cluster specifying the cache cluster to scale up and the new, larger node type, using the Amazon CLI
modify-cache-cluster
command and the following parameters.--cache-cluster-id
– The name of the cache cluster you are scaling up.--cache-node-type
– The new node type you want to scale the cache cluster. This value must be one of the node types returned by thelist-allowed-node-type-modifications
command in step 1.--cache-parameter-group-name
– [Optional] Use this parameter if you are usingreserved-memory
to manage your cluster's reserved memory. Specify a custom cache parameter group that reserves the correct amount of memory for your new node type. If you are usingreserved-memory-percent
you can omit this parameter.--apply-immediately
– Causes the scale-up process to be applied immediately. To postpone the scale-up process to the cluster's next maintenance window, use the--no-apply-immediately
parameter.
For Linux, OS X, or Unix:
aws elasticache modify-cache-cluster \ --cache-cluster-id
my-redis-cache-cluster
\ --cache-node-typecache.m3.xlarge
\ --cache-parameter-group-nameredis32-m2-xl
\ --apply-immediatelyFor Windows:
aws elasticache modify-cache-cluster ^ --cache-cluster-id
my-redis-cache-cluster
^ --cache-node-typecache.m3.xlarge
^ --cache-parameter-group-nameredis32-m2-xl
^ --apply-immediatelyOutput from the above command looks something like this (JSON format).
{ "CacheCluster": { "Engine": "redis", "CacheParameterGroup": { "CacheNodeIdsToReboot": [], "CacheParameterGroupName": "default.redis6.x", "ParameterApplyStatus": "in-sync" }, "SnapshotRetentionLimit": 1, "CacheClusterId": "my-redis-cache-cluster", "CacheSecurityGroups": [], "NumCacheNodes": 1, "SnapshotWindow": "00:00-01:00", "CacheClusterCreateTime": "2017-02-21T22:34:09.645Z", "AutoMinorVersionUpgrade": true, "CacheClusterStatus": "modifying", "PreferredAvailabilityZone": "us-west-2a", "ClientDownloadLandingPage": "https://console.aws.amazon.com/elasticache/home#client-download:", "CacheSubnetGroupName": "default", "EngineVersion": "6.0", "PendingModifiedValues": { "CacheNodeType": "cache.m3.2xlarge" }, "PreferredMaintenanceWindow": "tue:11:30-tue:12:30", "CacheNodeType": "cache.m3.medium", "DataTiering": "disabled" } }
For more information, see modify-cache-cluster in the Amazon CLI Reference.
-
If you used the
--apply-immediately
, check the status of the new cache cluster using the Amazon CLIdescribe-cache-clusters
command with the following parameter. When the status changes to available, you can begin using the new, larger cache cluster.--cache-cache cluster-id
– The name of your single-node Valkey or Redis OSS cache cluster. Use this parameter to describe a particular cache cluster rather than all cache clusters.
aws elasticache describe-cache-clusters --cache-cluster-id
my-redis-cache-cluster
For more information, see describe-cache-clusters in the Amazon CLI Reference.
Scaling up single-node Valkey or Redis OSS cache clusters (ElastiCache API)
The following procedure describes how to scale up a single-node Valkey or Redis OSS cache cluster using the ElastiCache API. During this process, your Valkey or Redis OSS cluster will continue to serve requests with minimal downtime.
To scale up a single-node Valkey or Redis OSS cache cluster (ElastiCache API)
-
Determine the node types you can scale up to by running the ElastiCache API
ListAllowedNodeTypeModifications
action with the following parameter.CacheClusterId
– The name of the single-node Valkey or Redis OSS cache cluster you want to scale up.
https://elasticache.us-west-2.amazonaws.com/ ?Action=ListAllowedNodeTypeModifications &CacheClusterId=MyRedisCacheCluster &Version=2015-02-02 &SignatureVersion=4 &SignatureMethod=HmacSHA256 &Timestamp=20150202T192317Z &X-Amz-Credential=<credential>
For more information, see ListAllowedNodeTypeModifications in the Amazon ElastiCache API Reference.
-
Modify your existing cache cluster specifying the cache cluster to scale up and the new, larger node type, using the
ModifyCacheCluster
ElastiCache API action and the following parameters.CacheClusterId
– The name of the cache cluster you are scaling up.CacheNodeType
– The new, larger node type you want to scale the cache cluster up to. This value must be one of the node types returned by theListAllowedNodeTypeModifications
action in the previous step.CacheParameterGroupName
– [Optional] Use this parameter if you are usingreserved-memory
to manage your cluster's reserved memory. Specify a custom cache parameter group that reserves the correct amount of memory for your new node type. If you are usingreserved-memory-percent
you can omit this parameter.ApplyImmediately
– Set totrue
to cause the scale-up process to be performed immediately. To postpone the scale-up process to the cluster's next maintenance window, useApplyImmediately
=false
.
https://elasticache.us-west-2.amazonaws.com/ ?Action=ModifyCacheCluster &ApplyImmediately=true &CacheClusterId=MyRedisCacheCluster &CacheNodeType=cache.m3.xlarge &CacheParameterGroupName redis32-m2-xl &Version=2015-02-02 &SignatureVersion=4 &SignatureMethod=HmacSHA256 &Timestamp=20150202T192317Z &X-Amz-Credential=<credential>
For more information, see ModifyCacheCluster in the Amazon ElastiCache API Reference.
-
If you used
ApplyImmediately
=true
, check the status of the new cache cluster using the ElastiCache APIDescribeCacheClusters
action with the following parameter. When the status changes to available, you can begin using the new, larger cache cluster.CacheClusterId
– The name of your single-node Valkey or Redis OSS cache cluster. Use this parameter to describe a particular cache cluster rather than all cache clusters.
https://elasticache.us-west-2.amazonaws.com/ ?Action=DescribeCacheClusters &CacheClusterId=MyRedisCacheCluster &Version=2015-02-02 &SignatureVersion=4 &SignatureMethod=HmacSHA256 &Timestamp=20150202T192317Z &X-Amz-Credential=<credential>
For more information, see DescribeCacheClusters in the Amazon ElastiCache API Reference.
Scaling down single-node Valkey or Redis OSS clusters
The following sections walk you through how to scale a single-node Valkey or Redis OSS cluster down to a smaller node type. Ensuring that the new, smaller node type is large enough to accommodate all the data and Valkey or Redis OSS overhead is important to the long-term success of your new Valkey or Redis OSS cluster. For more information, see Ensuring you have enough memory to make a Valkey or Redis OSS snapshot.
Note
For clusters running the r6gd node type, you can only scale to node sizes within the r6gd node family.
Topics
Scaling down a single-node Valkey or Redis OSS cluster (Console)
The following procedure walks you through scaling your single-node Valkey or Redis OSS cluster down to a smaller node type using the ElastiCache console.
Important
If your parameter group uses reserved-memory
to set aside memory for Valkey or Redis OSS overhead, before you begin scaling be sure that you have a custom parameter
group that reserves the correct amount of memory for your new node type.
Alternatively, you can modify a custom parameter group so that it uses
reserved-memory-percent
and use that parameter group for
your new cluster.
If you're using reserved-memory-percent
, doing this is not necessary.
For more information, see Managing reserved memory for Valkey and Redis OSS.
To scale down your single-node Valkey or Redis OSS cluster (console)
-
Ensure that the smaller node type is adequate for your data and overhead needs.
-
If your parameter group uses
reserved-memory
to set aside memory for Valkey or Redis OSS overhead, ensure that you have a custom parameter group to set aside the correct amount of memory for your new node type.Alternatively, you can modify your custom parameter group to use
reserved-memory-percent
. For more information, see Managing reserved memory for Valkey and Redis OSS. -
Sign in to the Amazon Web Services Management Console and open the ElastiCache console at https://console.amazonaws.cn/elasticache/
. -
From the list of clusters, choose the cluster you want to scale down. This cluster must be running the Valkey or Redis OSS engine and not the clustered Valkey or Redis OSS engine.
-
Choose Modify.
-
In the Modify Cluster wizard:
-
Choose the node type you want to scale down to from the Node type list.
-
If you're using
reserved-memory
to manage your memory, from the Parameter Group list, choose the custom parameter group that reserves the correct amount of memory for your new node type.
-
-
If you want to perform the scale-down process right away, choose the Apply immediately check box. If the Apply immediately check box is left not chosen, the scale-down process is performed during this cluster's next maintenance window.
-
Choose Modify.
-
When the cluster’s status changes from modifying to available, your cluster has scaled to the new node type. There is no need to update the endpoints in your application.
Scaling down single-node Valkey or Redis OSS cache clusters (Amazon CLI)
The following procedure describes how to scale down a single-node Valkey or Redis OSS cache cluster using the Amazon CLI.
To scale down a single-node Valkey or Redis OSS cache cluster (Amazon CLI)
-
Determine the node types you can scale down to by running the Amazon CLI
list-allowed-node-type-modifications
command with the following parameter.--cache-cluster-id
For Linux, OS X, or Unix:
aws elasticache list-allowed-node-type-modifications \ --cache-cluster-id
my-cache-cluster-id
For Windows:
aws elasticache list-allowed-node-type-modifications ^ --cache-cluster-id
my-cache-cluster-id
Output from the above command looks something like this (JSON format).
{ "ScaleUpModifications": [ "cache.m3.2xlarge", "cache.m3.large", "cache.m3.xlarge", "cache.m4.10xlarge", "cache.m4.2xlarge", "cache.m4.4xlarge", "cache.m4.large", "cache.m4.xlarge", "cache.r3.2xlarge", "cache.r3.4xlarge", "cache.r3.8xlarge", "cache.r3.large", "cache.r3.xlarge" ] "ScaleDownModifications": [ "cache.t2.micro", "cache.t2.small ", "cache.t2.medium ", "cache.t1.small ", ], }
For more information, see list-allowed-node-type-modifications in the Amazon CLI Reference.
-
Modify your existing cache cluster specifying the cache cluster to scale down and the new, smaller node type, using the Amazon CLI
modify-cache-cluster
command and the following parameters.--cache-cluster-id
– The name of the cache cluster you are scaling down.--cache-node-type
– The new node type you want to scale the cache cluster. This value must be one of the node types returned by thelist-allowed-node-type-modifications
command in step 1.--cache-parameter-group-name
– [Optional] Use this parameter if you are usingreserved-memory
to manage your cluster's reserved memory. Specify a custom cache parameter group that reserves the correct amount of memory for your new node type. If you are usingreserved-memory-percent
you can omit this parameter.--apply-immediately
– Causes the scale-down process to be applied immediately. To postpone the scale-up process to the cluster's next maintenance window, use the--no-apply-immediately
parameter.
For Linux, OS X, or Unix:
aws elasticache modify-cache-cluster \ --cache-cluster-id
my-redis-cache-cluster
\ --cache-node-typecache.m3.xlarge
\ --cache-parameter-group-nameredis32-m2-xl
\ --apply-immediatelyFor Windows:
aws elasticache modify-cache-cluster ^ --cache-cluster-id
my-redis-cache-cluster
^ --cache-node-typecache.m3.xlarge
^ --cache-parameter-group-nameredis32-m2-xl
^ --apply-immediatelyOutput from the above command looks something like this (JSON format).
{ "CacheCluster": { "Engine": "redis", "CacheParameterGroup": { "CacheNodeIdsToReboot": [], "CacheParameterGroupName": "default.redis6,x", "ParameterApplyStatus": "in-sync" }, "SnapshotRetentionLimit": 1, "CacheClusterId": "my-redis-cache-cluster", "CacheSecurityGroups": [], "NumCacheNodes": 1, "SnapshotWindow": "00:00-01:00", "CacheClusterCreateTime": "2017-02-21T22:34:09.645Z", "AutoMinorVersionUpgrade": true, "CacheClusterStatus": "modifying", "PreferredAvailabilityZone": "us-west-2a", "ClientDownloadLandingPage": "https://console.aws.amazon.com/elasticache/home#client-download:", "CacheSubnetGroupName": "default", "EngineVersion": "6.0", "PendingModifiedValues": { "CacheNodeType": "cache.m3.2xlarge" }, "PreferredMaintenanceWindow": "tue:11:30-tue:12:30", "CacheNodeType": "cache.m3.medium", "DataTiering": "disabled" } }
For more information, see modify-cache-cluster in the Amazon CLI Reference.
-
If you used the
--apply-immediately
, check the status of the new cache cluster using the Amazon CLIdescribe-cache-clusters
command with the following parameter. When the status changes to available, you can begin using the new, larger cache cluster.--cache-cache cluster-id
– The name of your single-node Valkey or Redis OSS cache cluster. Use this parameter to describe a particular cache cluster rather than all cache clusters.
aws elasticache describe-cache-clusters --cache-cluster-id
my-redis-cache-cluster
For more information, see describe-cache-clusters in the Amazon CLI Reference.
Scaling down single-node Valkey or Redis OSS cache clusters (ElastiCache API)
The following procedure describes how to scale updown a single-node Valkey or Redis OSS cache cluster using the ElastiCache API.
To scale down a single-node Valkey or Redis OSS cache cluster (ElastiCache API)
-
Determine the node types you can scale down to by running the ElastiCache API
ListAllowedNodeTypeModifications
action with the following parameter.CacheClusterId
– The name of the single-node Valkey or Redis OSS cache cluster you want to scale down.
https://elasticache.us-west-2.amazonaws.com/ ?Action=ListAllowedNodeTypeModifications &CacheClusterId=MyRedisCacheCluster &Version=2015-02-02 &SignatureVersion=4 &SignatureMethod=HmacSHA256 &Timestamp=20150202T192317Z &X-Amz-Credential=<credential>
For more information, see ListAllowedNodeTypeModifications in the Amazon ElastiCache API Reference.
-
Modify your existing cache cluster specifying the cache cluster to scale up and the new, larger node type, using the
ModifyCacheCluster
ElastiCache API action and the following parameters.CacheClusterId
– The name of the cache cluster you are scaling down.CacheNodeType
– The new, smaller node type you want to scale the cache cluster down to. This value must be one of the node types returned by theListAllowedNodeTypeModifications
action in previous step.CacheParameterGroupName
– [Optional] Use this parameter if you are usingreserved-memory
to manage your cluster's reserved memory. Specify a custom cache parameter group that reserves the correct amount of memory for your new node type. If you are usingreserved-memory-percent
you can omit this parameter.ApplyImmediately
– Set totrue
to cause the scale-down process to be performed immediately. To postpone the scale-up process to the cluster's next maintenance window, useApplyImmediately
=false
.
https://elasticache.us-west-2.amazonaws.com/ ?Action=ModifyCacheCluster &ApplyImmediately=true &CacheClusterId=MyRedisCacheCluster &CacheNodeType=cache.m3.xlarge &CacheParameterGroupName redis32-m2-xl &Version=2015-02-02 &SignatureVersion=4 &SignatureMethod=HmacSHA256 &Timestamp=20150202T192317Z &X-Amz-Credential=<credential>
For more information, see ModifyCacheCluster in the Amazon ElastiCache API Reference.
-
If you used
ApplyImmediately
=true
, check the status of the new cache cluster using the ElastiCache APIDescribeCacheClusters
action with the following parameter. When the status changes to available, you can begin using the new, smaller cache cluster.CacheClusterId
– The name of your single-node Valkey or Redis OSS cache cluster. Use this parameter to describe a particular cache cluster rather than all cache clusters.
https://elasticache.us-west-2.amazonaws.com/ ?Action=DescribeCacheClusters &CacheClusterId=MyRedisCacheCluster &Version=2015-02-02 &SignatureVersion=4 &SignatureMethod=HmacSHA256 &Timestamp=20150202T192317Z &X-Amz-Credential=<credential>
For more information, see DescribeCacheClusters in the Amazon ElastiCache API Reference.