Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Cette page explique comment rechercher et se connecter au point de terminaison du service de détection automatique de votre instance Memcached. Pour en savoir plus sur le service de détection automatique de Memorystore pour Memcached, consultez la page Présentation du service de détection automatique.
Rechercher le point de terminaison de détection de votre instance
Vous pouvez trouver le point de terminaison de détection de votre instance Memcached sur la page d'informations de l'instance dans la console Google Cloud .
Vous pouvez également afficher le point de terminaison de détection de votre instance Memcached à l'aide de la commande suivante, en remplaçant les variables par les valeurs appropriées :
Les valeurs du point de terminaison de détection sont répertoriées sous le libellé discoveryEndpoint :
discoveryEndpoint: [IP-address]:[port-number]
Se connecter au point de terminaison de détection de votre instance à l'aide de Telnet
Pour vous connecter au point de terminaison de détection de votre instance à l'aide de Telnet, exécutez la commande suivante en remplaçant les variables par les valeurs appropriées :
Une fois connecté au point de terminaison de détection de l'instance Memorystore pour Memcached à l'aide de Telnet, exécutez la commande Memcached suivante pour obtenir l'ID de version de configuration et la liste des nœuds :
config get cluster
Cette commande renvoie les informations suivantes au format suivant :
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/05 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/05 (UTC)."],[],[],null,["# Use the Auto Discovery service\n\nThis page explains how to find and connect to your Memcached instance's Auto\nDiscovery service endpoint. For more information about Memorystore for Memcached's\nAuto Discovery service, see [Auto Discovery service overview](/memorystore/docs/memcached/auto-discovery-overview).\n\nFinding your instance's discovery endpoint\n------------------------------------------\n\nYou can find the discovery endpoint for your Memcached instance on the\ninstance's details page in the Google Cloud console.\n\nYou can also view your Memcached instance's discovery endpoint by running the\nfollowing command, replacing \u003cvar translate=\"no\"\u003evariables\u003c/var\u003e with appropriate values: \n\n```\ngcloud memcache instances describe instance-id --project=project --region=region --format=\"default(discoveryEndpoint)\"\n```\n\nThe values for the discovery endpoint are listed under the\n`discoveryEndpoint` label:\n\n- `discoveryEndpoint: [IP-address]:[port-number]`\n\nConnecting to your instance's discovery endpoint using Telnet\n-------------------------------------------------------------\n\n| **Note:** You should not use the discovery endpoint for Memcached data queries such as `set` and `get`.\n\nTo connect to your instance's discovery endpoint using Telnet, run the following\ncommand, replacing \u003cvar translate=\"no\"\u003evariables\u003c/var\u003e with appropriate values: \n\n```\ntelnet discovery-endpoint-ip-address discovery-endpoint-port-number\n```\n\nOnce connected to your Memorystore for Memcached instance's discovery endpoint\nusing Telnet, run the following Memcached command to get the Configuration\nVersion ID and Node List: \n\n```\nconfig get cluster\n```\n\nThis command returns the following information in the following format: \n\n```\nCONFIG cluster 0 [length-of-payload-in-next-two-lines]\n[integer]\n[node1-ip]|[node1-ip]|[node1-port][node2-ip]|[node2-ip]|[node2-port]\n\\r\\n\nEND\\r\\n\n```\n\n- The last integer of the first line represents the number of bytes contained\n in the next two lines.\n\n - If you are not configuring your parser, you can ignore this line.\n - This line is helpful if you are programming your parser which may need to determine the length of the bytes to read from the request.\n- The second line is an integer, which is the Configuration Version ID\n described in [Overview of Auto Discovery service architecture](/memorystore/docs/memcached/auto-discovery-overview#overview_of_auto_discovery_service_architecture).\n\n- The third line is the Node List string, which contains the IP addresses and\n port numbers of the current nodes in your cluster.\n\nWhat's next\n-----------\n\n- Learn more about Auto Discovery with the [Auto Discovery service overview](/memorystore/docs/memcached/auto-discovery-overview).\n- View the available [Memcached configurations](/memorystore/docs/memcached/memcached-configs)."]]