Pour assurer une haute disponibilité, une instance principale AlloyDB comprend deux instances de machines virtuelles (VM) : une VM active qui répond aux requêtes et une VM de secours. Ces VM s'exécutent dans deux zones différentes de la région de l'instance.
Pour déterminer dans quelles zones s'exécutent les VM de votre instance principale, suivez les étapes de la section précédente, puis examinez une partie spécifique de la résultat de la commande ou de l'affichage de la console Google Cloud :
Console
Dans la console Google Cloud , accédez à la page Clusters :
La colonne Emplacement affiche la zone de la VM active de chaque instance principale.
Notez que la même colonne n'affiche que l'ID de région pour les clusters et les instances de pool de lecture. Par exemple, un cluster dont la position est us-central1 peut avoir une instance principale affichant l'ID de zone complet de sa VM active, à savoir us-central1-f.
La section Instances de votre cluster de la page d'informations d'un cluster affiche les mêmes informations dans le champ Emplacement de l'instance principale. Ce champ indique également l'emplacement de la VM de secours, qui est libellé "Zone secondaire".
Par exemple, la sortie partielle suivante indique que la VM active de l'instance principale s'exécute dans la zone us-central1-f, tandis que sa VM de secours se trouve dans la zone us-central1-c :
Déterminer les nœuds d'une instance de pool de lecture
Lorsque vous affichez les détails d'une instance de pool de lecture à l'aide de gcloud, vous pouvez obtenir plus d'informations sur ses nœuds constitutifs avec l'argument facultatif --view=FULL. Pour en savoir plus, consultez Résoudre les problèmes liés aux requêtes de pool de lecture.
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/04 (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/04 (UTC)."],[[["\u003cp\u003eThis page guides users on how to view detailed information about an instance within an AlloyDB cluster using the Google Cloud console or the gcloud CLI.\u003c/p\u003e\n"],["\u003cp\u003eUsers can view instance details such as the instance ID, region ID, cluster ID, and project ID through the Google Cloud console's "Clusters" page or by using the \u003ccode\u003egcloud alloydb instances describe\u003c/code\u003e command.\u003c/p\u003e\n"],["\u003cp\u003eFor primary instances, the provided steps can be used to identify the zones of both the active and standby virtual machines (VMs) for high availability, displaying the zone under the location column.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egcloud\u003c/code\u003e command output reveals the zone IDs of the active VM under the \u003ccode\u003ewritableNode\u003c/code\u003e field and the standby VM's zone under the \u003ccode\u003enodes\u003c/code\u003e field.\u003c/p\u003e\n"]]],[],null,["# View instance details\n\nThis page describes how to view detailed information about an instance in\nan AlloyDB cluster.\n\n\nBefore you begin\n----------------\n\n- The Google Cloud project you are using must have been [enabled to access AlloyDB](/alloydb/docs/project-enable-access).\n- You must have one of these IAM roles in the Google Cloud project you are using:\n - `roles/alloydb.admin` (the AlloyDB Admin predefined IAM role)\n - `roles/owner` (the Owner basic IAM role)\n - `roles/editor` (the Editor basic IAM role)\n\n If you don't have any of these roles, contact your Organization Administrator to request\n access.\n\n\u003cbr /\u003e\n\nProcedure\n---------\n\n### Console\n\n1. In the Google Cloud console, go to the **Clusters** page.\n\n [Go to Clusters](https://console.cloud.google.com/alloydb/clusters)\n2. Click a cluster in the **Resource Name** column.\n\n3. In the **Overview** page that opens, go to the **Instances in your\n cluster** section and view the details about your instance.\n\n### gcloud\n\n\nTo use the gcloud CLI, you can\n[install and initialize](/sdk/docs/install) the Google Cloud CLI, or you\ncan use [Cloud Shell](/shell/docs/using-cloud-shell).\n\n\u003cbr /\u003e\n\nUse the [`gcloud alloydb instances describe`](/sdk/gcloud/reference/beta/alloydb/instances/describe) command to view details about an instance. \n\n gcloud alloydb instances describe \u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e \\\n --region=\u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e \\\n --cluster=\u003cvar translate=\"no\"\u003eCLUSTER_ID\u003c/var\u003e \\\n --project=\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e: The ID of the instance.\n- \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e: The instance's region ID.\n- \u003cvar translate=\"no\"\u003eCLUSTER_ID\u003c/var\u003e: The ID of the instance's cluster.\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The ID of the instance's project.\n\nDetermine a primary instance's zones\n------------------------------------\n\nFor the sake of high availability, an AlloyDB primary\ninstance comprises two virtual machine (VM) instances: an active VM\nwhich responds to requests, and a standby VM. These VMs run within [two\ndifferent zones of the instance's\nregion](/docs/geography-and-regions#regions_and_zones).\n\nYou can determine which zones your primary instance's VMs run in by\nfollowing the steps in the previous section, and then examining a\nparticular part of the command output or Google Cloud console display: \n\n### Console\n\nIn the Google Cloud console, go to the **Clusters page**:\n\n[Go to Clusters](https://console.cloud.google.com/alloydb/clusters)\n\nThe **Location** column displays the zone of each primary instance's active VM.\n\nNote that the same column displays only the region ID for clusters and read-pool instances. For example, a cluster with a **Location** of `us-central1` might have a primary instance displaying its active VM's full zone ID of `us-central1-f`.\n\nThe **Instances in your cluster** section of a cluster's detail page displays this same information, in the primary instance's **Location** field. This field also lists the standby VM's location, labeled as \"secondary zone\".\n\n### gcloud\n\nAfter running [the command described in the previous section](#procedure), locate the following fields in the command's output:\n\n- `writeableNode`: The active VM's zone ID\n\n- `nodes`: The standby VM's zone ID\n\nFor example, the following partial output indicates that the primary instance's active VM runs in zone `us-central1-f`, while its standby is in `us-central1-c`: \n\n nodes:\n - zoneId: us-central1-c\n reconciling: false\n state: READY\n uid: 3477b790-21bc-4338-a09e-339912e3b28e\n updateTime: '2022-08-09T21:22:16.671268941Z'\n writableNode:\n zoneId: us-central1-f\n\nDetermine a read pool instance's nodes\n--------------------------------------\n\nWhen viewing the details of a read pool instance using `gcloud`, you can see further information about its constituent nodes with the optional `--view=FULL` argument. For more information, see [Troubleshoot read pool queries](/alloydb/docs/troubleshoot/read-pools)."]]