Memcached 節點是 Memcached 執行個體的基本單位。建立叢集之前,請務必先決定要建立的節點數量、每個節點的記憶體,以及每個節點的 vCPU 數量。節點的設定和數量取決於資料集大小、鍵遺失容許值和工作負載特性。每個節點都有一個 IP 位址和通訊埠。您可以手動取得所有節點的 IP 位址清單,也可以使用自動探索服務。
自動探索服務可讓 Memcached 用戶端透過程式輔助的方式,探索叢集中的所有節點。用戶端可以定期查詢探索端點,取得節點 IP 位址清單。這份清單通常用於使用一致的雜湊法,在所有節點之間分發索引鍵。對於定期調整執行個體中節點數量的環境來說,使用 Auto Discovery 服務特別實用。詳情請參閱「自動探索服務」。
[[["容易理解","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-05 (世界標準時間)。"],[],[],null,["# Memorystore for Memcached overview\n\nThis page introduces the Memorystore for Memcached service, including use cases, key concepts, and the advantages of using Memcached.\n\nMemorystore for Memcached is a highly scalable, fully managed Memcached service for the Google Cloud. The service is built on open source Memcached and is binary and ASCII protocol compliant. This service can be accessed using standard OSS Memcached client libraries across all languages, making it easy to lift and shift existing applications with little to no code changes.\n\nHigh-performance, scalable web applications often use a distributed, in-memory data store to achieve low latency and high performance. Memcached is a popular distributed in-memory key-value store used for building such applications. Some of the common Memcached use cases include caching of reference data, database query caching, and, in some cases, use as a session store.\n\nTo learn more about Memcached, see the Open Source Software (OSS) Memcached [about page](https://memcached.org/about).\n\nMemorystore also makes it very easy to deploy a Memcached service. You deploy Memorystore and Google manages the service for you, so that you can focus on your application. Memorystore gives you all the benefits of Memcached without the overhead of installing and managing it.\n\nKey concepts\n------------\n\nMemorystore for Memcached enables creating a fully-managed Memcached cluster. Before using the service, it is important to understand some key concepts and terms.\n\n- **Memcached Instance** represents one instance of a Memcached cluster. An instance can be comprised of a single node or a collection of nodes. All nodes in an instance must have the same memory per node, and the same number of vCPUs. Keys written to your instance are divided across all nodes in your cluster, and are not replicated.\n\n- **Memcached Node** is the fundamental unit of a Memcached instance. Before creating a cluster it is important to determine the number of nodes, the memory per node, and the number of vCPUs per node that will be used to create the Memcached cluster. The configuration of the node and the number of nodes depends on the size of the dataset, tolerance for key loss, and workload characteristics. Each node has an IP address and port. You can [get the list of IP addresses of all the nodes manually](/memorystore/docs/memcached/creating-managing-instances#viewing_instance_information), or by using the [Auto Discovery service](/memorystore/docs/memcached/auto-discovery-overview).\n\n- **Location** allows you to specify the [region](/docs/geography-and-regions) in which you deploy your instance, and how the nodes are distributed across the zones within the region.\n\n When creating a Memorystore instance first choose the region in which to deploy the instance. The choice of region is an important consideration. You should deploy the instance in the same region where the application accessing the Memorystore instance is deployed. Accessing a Memorystore instance from a Google Cloud resource in a different region is not supported.\n\n All Memorystore nodes are distributed within the region you designate. Within the region, you have the option to automatically distribute the nodes across all zones or select the specific zones where the nodes should be located. We recommend that you distribute the nodes automatically to allow Memorystore to distribute nodes optimally in available zones. You should avoid provisioning all nodes in a single zone, to improve your application's fault tolerance.\n- **Authorized VPC Network** designates which Google [VPC network](/vpc/docs/vpc) your instance uses. This network is set during instance creation, and cannot be altered later. A [private services access](/vpc/docs/private-services-access) connection must be established on a VPC network in order for it to work with Memorystore for Memcached. Only resources and users who have access to the network can access the instance.\n\n- **Private services access** connection must be [established](/memorystore/docs/redis/establishing-connection) for the authorized VPC network that the Memcached instance uses before you can create the Memcached instance. We recommend that you [contact your networking/security team](/memorystore/docs/redis/networking#communicating_networking_requirements) to setup the connection before creating the instance. A private services access connection enables creating instances using internal IP addresses and provides administrators control over the internal IP address range used by Memorystore instances. For more details, see [Networking](/memorystore/docs/redis/networking).\n\n- **Configurations** allow setting Memcached specific configurations during instance creation, and also permit changing the configurations during runtime. For a list of supported configurations, see [Memcache configurations](/memorystore/docs/memcached/memcached-configs).\n\n- **Auto Discovery service** provides a programmatic way for Memcached clients to discover all the nodes in the cluster. Clients can periodically query the discovery endpoint to get the list of node IP addresses. The list is typically used to distribute the keys across all the nodes using consistent hashing. Using the Auto Discovery service is particularly useful for environments that periodically scale the number of nodes in an instance. To learn more, see [Auto discovery service](/memorystore/docs/memcached/auto-discovery-overview).\n\nThe following table outlines the different features and capabilities available Memorystore for Memcached:\n\nWhat's next\n-----------\n\n- [Create a Memcached instance](/memorystore/docs/memcached/creating-managing-instances).\n- Set up Memorystore for Memcached [Networking](/memorystore/docs/memcached/networking).\n- [Establish a private services access connection](/memorystore/docs/memcached/establishing-connection)."]]