[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["# Scale Memcached instances\n\nThis page explains how to scale instances, and how scaling works for\nMemorystore for Memcached.\n\nYou can scale the number of nodes in a cluster down to a minimum of 1 node or\nup to a maximum of 20 nodes. You cannot scale a node's memory capacity or\nnumber of vCPUs.\n\n### Scaling out\n\nWhen you scale out your cluster, unless you use [Auto Discovery](/memorystore/docs/memcached/auto-discovery-overview)\nyou must manually add the IP addresses of the new nodes to your application so\nthe application can access them. Also, Memorystore for Memcached does not rebalance the\ndata in your nodes. You must manage any data rebalancing you wish to perform.\n\n### Scaling in\n\nIf you scale in your instance, you will lose the data that is stored in the\nnodes that are deleted from your cluster.\n\nDuring a scale in operation, Memorystore removes nodes from the end of the\nnode list. For example, if you are scaling from 12 nodes to 8 nodes, nodes 9-12\nwill be deleted from the instance.\n\nYou can view the node list on your Memcached instance's **node list**\ntab in the Google Cloud console.\n\nYou can also view the node list by running the following command, replacing\n\u003cvar translate=\"no\"\u003evariables\u003c/var\u003e with appropriate values: \n\n```\ngcloud memcache instances describe instance-id --region=us-region\n```\n\n#### Managing nodes when scaling in\n\nYour application's node management strategy affects what actions you need to\ntake when scaling in your cluster.\n\nIf you manually manage the addition and removal of Memcached nodes in your\napplication, you must adjust your code by removing references to the nodes that\nwill be deleted before scaling in the cluster.\n\nIf you use [Auto Discovery](/memorystore/docs/memcached/auto-discovery-overview),\nnode addition and removal is handled for you automatically.\n\nScaling the number of nodes in your cluster\n-------------------------------------------\n\n### Console\n\n1. Go to the Memorystore for Memcached page in the Google Cloud console.\n\n \u003cbr /\u003e\n\n [Memorystore for Memcached](https://console.cloud.google.com/memorystore/memcached/instances)\n2. Click the Instance ID of the instance you want to resize.\n\n3. Click **Edit**.\n\n4. In the **Nodes** field, enter your desired number of nodes.\n\n5. Click **Save**.\n\n### Gcloud\n\nEnter the following command, replacing the \u003cvar translate=\"no\"\u003evariables\u003c/var\u003e\nwith the appropriate values: \n\n```\ngcloud memcache instances update instance-id --region=region --node-count=desired-number-of-nodes\n```\n\nFor example: \n\n```\ngcloud memcache instances update myinstance --region=us-central1 --node-count=6\n```\n\nWhat's next\n-----------\n\n- View available [Memcached configurations](/memorystore/docs/memcached/memcached-configs).\n- [Monitor your Memcached instances](/memorystore/docs/memcached/monitoring-instances)."]]