Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Nesta página, descrevemos como escalonar uma instância do Memorystore para Valkey. A capacidade da sua instância é determinada pelo número de fragmentos e pelo tipo de nó da instância.
Para escalonar sua instância, mude a contagem de fragmentos ou o tipo de nó.
Para mais informações sobre o comportamento de uma instância durante o escalonamento, consulte
Sobre o escalonamento da capacidade da instância.
Ajustar a contagem de fragmentos
É possível aumentar ou diminuir o número de fragmentos de uma instância usando o console do Google Cloud ou a Google Cloud CLI.
Console
No console Google Cloud , acesse a página Memorystore para Valkey.
REGION_ID: a região em que a instância está localizada.
SHARD_COUNT: o número de fragmentos na sua instância. A contagem de fragmentos determina a capacidade total de memória para armazenar dados de instâncias. Para mais informações sobre as especificações de instância e nó do Memorystore para Valkey, consulte Especificação de instância e nó.
REGION_ID: a região em que a instância está localizada (por exemplo, us-central1)
Verifique a saída para saber se as seguintes condições existem:
A saída contém uma seção engineConfigs.
Os parâmetros maxmemory-clients, maxmemory ou maxclients aparecem nesta seção.
Se algum desses parâmetros aparecer, ao dimensionar o tipo de nó para a instância, você precisará dimensionar os valores dos parâmetros para refletir valores que o Memorystore para Valkey pode aceitar para o tipo de nó dimensionado. Para mais informações, consulte Parâmetros de configuração modificáveis.
REGION_ID: a região em que a instância está localizada.
NODE_TYPE: o tipo de nó para o qual você quer escalonar sua instância. Os valores aceitáveis para esse parâmetro são shared-core-nano,
standard-small, highmem-medium e highmem-xlarge.
Neste exemplo, você vai escalonar o tipo de nó da instância my-instance para highmem-medium. Essa instância está localizada na região us-central1.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-19 UTC."],[],[],null,["# Scale instance capacity\n\nThis page describes how to scale a Memorystore for Valkey instance. Your\ninstance's capacity is determined by the number of shards in your instance\nand your instance's [node type](/memorystore/docs/valkey/instance-node-specification).\nTo scale your instance, you must change the shard count or node type.\nFor more information about an instance's behavior during scaling, see\n[About scaling instance capacity](/memorystore/docs/valkey/about-scaling-instance-capacity).\n\nScale the shard count\n---------------------\n\nYou can increase or decrease the number of shards for an instance by using\neither the Google Cloud console or [Google Cloud CLI](/sdk/gcloud).\n**Note:** If you specify **Cluster Mode Enabled** when you [create an instance](/memorystore/docs/valkey/create-instances#create_an_instance), then you can scale the shard count for the instance. If you specify **Cluster Mode Disabled**, then Memorystore for Valkey doesn't partition the instance, but hosts it on a single shard. Therefore, you can't scale the number of the shards for the instance. \n\n### Console\n\n1. In the Google Cloud console, go to the **Memorystore for Valkey** page.\n\n [Memorystore for Valkey](https://console.cloud.google.com/memorystore/valkey/instances?)\n2. Click your instance ID.\n\n3. In the **Configurations** section, click the pencil icon next to\n **Shards**.\n\n4. In the **Shards** field, enter the number of shards to which you want to\n scale your instance.\n\n5. Click **Update instance**.\n\n### gcloud\n\nTo scale the number of shards for an instance, use the [`gcloud memorystore instances update`](/sdk/gcloud/reference/memorystore/instances/update) command: \n\n```\ngcloud memorystore instances update INSTANCE_ID \\\n--location=REGION_ID \\\n--shard-count=SHARD_COUNT\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e: the ID of your instance.\n- \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e: the region where your instance is located.\n- \u003cvar translate=\"no\"\u003eSHARD_COUNT\u003c/var\u003e: 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](/memorystore/docs/valkey/instance-node-specification).\n\nFor example: \n\n```\ngcloud memorystore instances update my-instance \\\n--location=us-central1 \\\n--shard-count=8\n```\n\nScale the node type\n-------------------\n\nYou can scale the node type for an instance by using the [Google Cloud CLI](/sdk/gcloud). \n\n### gcloud\n\n1. To retrieve information about an instance, use the [`gcloud memorystore instances describe`](/sdk/gcloud/reference/memorystore/instances/describe) command:\n\n ```\n gcloud memorystore instances describe INSTANCE_ID \\\n --location=REGION_ID\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e: the ID of your instance\n - \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e: the region where your instance is located (for example, `us-central1`)\n2. Check the output to see if the following conditions exist:\n\n 1. The output contains an `engineConfigs` section.\n\n 2. The `maxmemory-clients`, `maxmemory`, or `maxclients` parameters appear\n in this section.\n\n If any of these parameters appear, then when you scale the node type for the\n instance, you must scale the values for the parameters to reflect values\n that Memorystore for Valkey can accept for the scaled node type. For more\n information, see [Modifiable configuration parameters](/memorystore/docs/valkey/supported-instance-configurations#modifiable_configuration_parameters).\n3. To scale the node type, use the [`gcloud memorystore instances update`](/sdk/gcloud/reference/memorystore/instances/update) command:\n\n ```\n gcloud memorystore instances update INSTANCE_ID \\\n --location=REGION_ID \\\n --node-type=NODE_TYPE\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e: the ID of your instance.\n - \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e: the region where your instance is located.\n - \u003cvar translate=\"no\"\u003eNODE_TYPE\u003c/var\u003e: the node type to which you want to scale your\n instance. Acceptable values for this parameter are `shared-core-nano`,\n `standard-small`, `highmem-medium`, and `highmem-xlarge`.\n\n | **Note:** You can't scale your instance down to the `shared-core-nano` node type.\n | **Caution** : We recommend that you use the `shared-core-nano` node type for development or testing purposes only. If you run Memorystore for Valkey in a production environment, then we recommend using the `standard-small`, `highmem-medium`, or `highmem-xlarge` node types. For more information about these node types, see [Choose a node type](/memorystore/docs/valkey/instance-node-specification#choose-node-type).\n\n For this example, you scale the node type of the `my-instance` instance to `highmem-medium`. This instance is located in the `us-central1`\n region. \n\n ```\n gcloud memorystore instances update my-instance \\\n --location=us-central1 \\\n --node-type=highmem-medium\n ```\n\n For this example, you change the value of the `maxclients` parameter to\n `15,000`. \n\n ```\n gcloud memorystore instances update my-instance \\\n --location=us-central1 \\\n --node-type=highmem-medium \\\n --update-engine-configs=maxclients=15000\n ```\n\n\u003cbr /\u003e"]]