Elasticache Operations
Available Operations
Add Replica
What is it?
It enables user to add the desired number of replicas in the cluster.
When to use?
This will help scale the cluster for reads and availability. This operation can be run only when the cluster is in running state or when the previous operation is in success
status.
How to use?
Specify the number of replicas to add using numOfReplicasPerShard . Please note that you need to provide the number of replicas to add E.g: If you have 1 replica and you want to add 1 more, the value of numOfReplicasPerShard will be 1.
Options
numOfReplicasPerShard
integer
The desired number of replicas
to add in the cluster.
--options '{
"
numOfReplicasPerShard": 2}'
Command
odin operate component --name [YOUR_COMPONENT_NAME] --service [YOUR_SERVICE_NAME]
--operation add-replica
--options '{"numOfReplicasPerShard": REPLICAS_COUNT_TO_ADD}'
--env [YOUR_ENV_NAME]
Example
odin operate component --name deadpool-elasticache --service deadpool-service
--operation add-replica
--options '{"numOfReplicasPerShard": 2}'
--env myEnv
Remove Replica
What is it?
It enables user to remove the desired number of replicas in the cluster.
When to use?
This will help scale the cluster for reads and availability. This operation can be run only when the cluster is in running state or when the previous operation is in success
status.
How to use?
Specify the number of replicas to remove from the cluster in numOfReplicasPerShard . Please note that you need to provide the number of replicas to remove E.g: If you have 1 replica and you want to remove 1 more, the value of numOfReplicasPerShard will be 1.
Option
numOfReplicasPerShard
integer
The desired number of replicas
to remove from the cluster.
--options '{
"
numOfReplicasPerShard": 1}'
Command
odin operate component --name [YOUR_COMPONENT_NAME] --service [YOUR_SERVICE_NAME]
--operation remove-replica
--options '{"numOfReplicasPerShard": REPLICAS_COUNT_TO_REMOVE}'
--env [YOUR_ENV_NAME]
Example
odin operate component --name deadpool-elasticache --service deadpool-service
--operation remove-replica
--options '{"numOfReplicasPerShard": 1}'
--env sr001
Add Shard
What is it?
It enables user to add the desired number of shards in the cluster.
When to use?
This helps scale the cluster for improved read and write performance. This operation can be run only when the cluster is in running state or when the previous operation is in success
status.
How to use?
Insert the count of shards to add from the cluster in numOfShards . Please note that you need to provide the number of shards to add E.g: If you have 2 shard and you want to add 1 , the value of numOfShards will be 1.
Option
numOfShards
integer
The desired number of shards
to add in the cluster.
--options '{
"
numOfShards": 1}'
Command
odin operate component --name [YOUR_COMPONENT_NAME] --service [YOUR_SERVICE_NAME]
--operation add-shard
--options '{"numOfShards": SHARD_COUNT_TO_ADD}'
--env [YOUR_ENV_NAME]
Example
odin operate component --name deadpool-elasticache --service deadpool-service
--operation add-shard
--options '{"numOfShards": 1}'
--env sr001
Remove Shard
What is it?
It enables user to remove the desired number of shards in the cluster.
When to use?
This will help scale the cluster for reduced read and write workload. This operation can be run only when the cluster is in running state or when the previous operation is in success
status.
How to use?
Insert the count of shards to remove from the cluster in numOfShards . Please note that you need to provide the number of shards to remove E.g: If you have 2 shard and you want to remove 1 , the value of numOfShards will be 1.
Command
odin operate component --name [YOUR_COMPONENT_NAME] --service [YOUR_SERVICE_NAME]
--operation add-shard
--options '{"numOfShards": SHARD_COUNT_TO_REMOVE}'
--env [YOUR_ENV_NAME]
Example
odin operate component --name deadpool-elasticache --service deadpool-service
--operation pause --options '{"numOfShards": 1}'
--env sr001
Vertical Scale
What is it?
This operation enables users to modify the instance type of the cluster.
When to use?
This operation can be run only when the cluster is in success
state.
Option
instanceType
string
The desired instance type to modify the cluster to.
--options '{
"
instanceType":"
cache.m5.large"}'
Command
odin operate component --name [YOUR_COMPONENT_NAME] --service [YOUR_SERVICE_NAME]
--operation resume
--options '{"instanceType": DESIRED_INSTANCE_TYPE}'
--env [YOUR_ENV_NAME]
Example
odin operate component --name deadpool-elasticache --service deadpool-service
--operation resume --options '{"instanceType":"cache.m5.large"}'
--env sr001
Last updated