Scale instance capacity

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

Scale the shard count

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

Note: If you specifyCluster Mode Enabled when youcreate an instance, then you can scale the shardcount for the instance. If you specifyCluster Mode Disabled, then Memorystore for Valkey doesn't partition the instance, but hosts it on asingle shard. Therefore, you can't scale the number of the shards for theinstance.

Console

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

    Memorystore for Valkey

  2. Click your instance ID.

  3. In theConfigurations section, click the pencil icon next toShards.

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

  5. ClickUpdate instance.

gcloud

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

gcloud memorystore instances updateINSTANCE_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 shardcount determines the total memory capacity for storing instance data. For moreinformation about instance and node specifications for Memorystore for Valkey instances, seeInstance 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 theGoogle Cloud CLI.

gcloud

  1. To retrieve information about an instance, use thegcloud memorystore instances describe command:

    gcloud memorystore instances describeINSTANCE_ID \--location=REGION_ID

    Replace the following:

    • INSTANCE_ID: the ID of your instance
    • REGION_ID: the region where your instance is located (for example,us-central1)
  2. Check the output to see if the following conditions exist:

    1. The output contains anengineConfigs section.

    2. Themaxmemory-clients,maxmemory, ormaxclients parameters appearin this section.

    If any of these parameters appear, then when you scale the node type for theinstance, you must scale the values for the parameters to reflect valuesthat Memorystore for Valkey can accept for the scaled node type. For moreinformation, seeModifiable configuration parameters.

  3. To scale the node type, use thegcloud memorystore instances update command:

    gcloud memorystore instances updateINSTANCE_ID \--location=REGION_ID \--node-type=NODE_TYPE

    Replace the following:

    For this example, you scale the node type of themy-instance instance tohighmem-medium. This instance is located in theus-central1region.

    gcloud memorystore instances update my-instance \--location=us-central1 \--node-type=highmem-medium

    For this example, you change the value of themaxclients parameter to15,000.

    gcloud memorystore instances update my-instance \--location=us-central1 \--node-type=highmem-medium \--update-engine-configs=maxclients=15000

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.