This page describes how to scale Memorystore for Valkey instances. Your instance capacity is determined by the number of shards in your instance, and your instance's node type. Therefore, to scale you must change the shard count for your instance. For more information about an instance's behavior during scaling, see About scaling instances.
Scale the shard count
Console
Go to the Memorystore for Valkey page in the Google Cloud console.
Click your instance ID.
In the Configurations section, click the pencil icon next to Shards.
Enter your desired number of shards under Shards.
Click the Update Instance button.
gcloud
To increase or decrease the size of an instance, run the update
command:
gcloud beta memorystore instances update INSTANCE \ --location=REGION_ID \ --shard-count=SHARD_COUNT
Replace the following:
- INSTANCE is the ID of the your instance.
- REGION_ID is the region where your instance is located.
- SHARD_COUNT determines the number of shards in your instance. Shard count determines the total memory capacity for storing instance data. To see more details about instance specification, see Instance and node specification.
For example:
gcloud beta memorystore instances update my-instance \ --location=us-central1 \ --shard-count=8