Scale instance capacity

This page describes how to scale a Memorystore for Valkey instance. Your instance's capacity is determined by the number of shards in your instance and your instance's node type. To scale your instance, you must change the shard count or node type. For more information about an instance's behavior during scaling, see About scaling instance capacity.

Scale the shard count

You can increase or decrease the number of shards for an instance by using either the Google Cloud console or Google Cloud CLI.

Console

  1. In the Google Cloud console, go to the Memorystore for Valkey page.

    Memorystore for Valkey

  2. Click your instance ID.

  3. In the Configurations section, click the pencil icon next to Shards.

  4. In the Shards field, enter the number of shards to which you want to scale your instance.

  5. Click Update instance.

gcloud

To scale the number of shards for an instance, use the gcloud memorystore instances update command:

gcloud memorystore instances update INSTANCE_ID \
--location=REGION_ID \
--shard-count=SHARD_COUNT

Replace the following:

  • INSTANCE_ID: the ID of your instance.
  • REGION_ID: the region where your instance is located.
  • SHARD_COUNT: the number of shards in your instance. The shard count determines the total memory capacity for storing instance data. For more information about instance and node specifications for Memorystore for Valkey instances, see Instance and node specification.

For example:

gcloud memorystore instances update my-instance \
--location=us-central1 \
--shard-count=8

Scale the node type

You can scale the node type for an instance by using the Google Cloud CLI.