Memorystore for Memcached 會使用探索端點公開 Auto Discovery 服務。探索端點是執行個體的專屬 IP 位址,可傳回 Memcached 執行個體中的目前節點清單。每個 Memorystore for Memcached 執行個體都有專屬的探索端點。建立執行個體後,探索端點的 IP 位址就不會變更。
[[["容易理解","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,["# About the Auto Discovery service\n\nThis page provides an overview of the Auto Discovery service for\nMemorystore for Memcached. To learn how to access and connect to the Auto Discovery\nservice, see [Using the Auto Discovery Service](/memorystore/docs/memcached/using-auto-discovery).\n\nThe Auto Discovery service is a programmatic way for clients to automatically\nadapt to the addition and removal of node IP addresses that happens when you\n[scale](/memorystore/docs/memcached/scaling-instances) your Memcached instance.\n\nIf you don't use the Auto Discovery service, you must manually manage the node\nIP address list in your memcached client during scaling. Manually managing the\nnode IP address list adds additional overhead because you must ensure that the\nclients are updated as the instance scales up and down. The Auto Discovery helps\nto automate this work for you.\n\nYou should use the Auto Discovery endpoint for its intended purpose, and not\nto run Memcached commands such as `get`, `set`, and `delete`.\n\nOverview of Auto Discovery service architecture\n-----------------------------------------------\n\nMemorystore for Memcached exposes the Auto Discovery service using a *discovery\nendpoint*. The discovery endpoint is a dedicated IP address for your instance\nthat returns a current list of nodes in your Memcached instance. Every\nMemorystore for Memcached instance has a unique discovery endpoint. Once the\ninstance is created, the IP address of the discovery endpoint does not change.\n\nTo get the instance's Auto Discovery information, you query the discovery\nendpoint. The discovery endpoint returns the following information:\n\nMemorystore for Memcached directly exposes the discovery endpoint, however auto\ndiscovery must also be available in your client libraries. There are two ways to\nhave auto discovery in your clients:\n\n1. Use a client library that supports auto discovery.\n\n - [Golang](https://github.com/google/gomemcache) memcached client fork.\n2. Manually add auto discovery logic to your client library.\n\nAuto Discovery service behavior\n-------------------------------\n\nThe Auto Discovery service is eventually consistent. There can be a delay (on\nthe order of seconds) while the Auto Discovery node list catches up to the\ncurrent cluster configuration after a scaling operation.\n\nEventual consistency, in addition to the distributed nature of the service,\ncan produce the following behavior for clients. The client logic should be\ndesigned to account for this behavior:\n\n- Same client on two separate queries to the Auto Discovery service can receive\n two different Auto Discovery responses from the service (while the service is\n inconsistent). However, one of the responses has a higher `Configuration\n version ID` which clients can use to handle the responses.\n\n- Two clients can receive two different Auto Discovery responses from the\n service (while the service is inconsistent), but they don't have a way to find\n which one is latest as clients don't talk to each other. While in this state,\n the instance can return cache misses. In this scenario, clients have to wait\n for the Auto Discovery service to become consistent.\n\nWhat's next\n-----------\n\n- Learn how to [Use the Auto Discovery service](/memorystore/docs/memcached/using-auto-discovery).\n- Review the available [Memcached configurations](/memorystore/docs/memcached/memcached-configs)."]]