Per garantire l'alta disponibilità, un'istanza principale AlloyDB
è costituita da due istanze di macchine virtuali (VM): una VM attiva
che risponde alle richieste e una VM in standby. Queste VM vengono eseguite in due
zone diverse della
regione dell'istanza.
Puoi determinare in quali zone vengono eseguite le VM dell'istanza primaria
seguendo i passaggi della sezione precedente ed esaminando una
parte specifica dell'output del comando o Google Cloud della visualizzazione della console:
Console
Nella console Google Cloud , vai alla pagina Cluster:
La colonna Posizione mostra la zona della VM attiva di ogni istanza principale.
Tieni presente che la stessa colonna mostra solo l'ID regione per i cluster e le istanze del pool di lettura. Ad esempio, un cluster con una posizione di us-central1 potrebbe avere un'istanza primaria che mostra l'ID zona completo della sua VM attiva di us-central1-f.
La sezione Istanze nel cluster della pagina dei dettagli di un cluster mostra le stesse informazioni nel campo Posizione dell'istanza principale. Questo campo elenca anche la posizione della VM di standby, etichettata come "zona secondaria".
Ad esempio, il seguente output parziale indica che la VM attiva dell'istanza principale viene eseguita nella zona us-central1-f, mentre la VM in standby si trova in us-central1-c:
Determinare i nodi di un'istanza del pool di lettura
Quando visualizzi i dettagli di un'istanza del pool di lettura utilizzando gcloud, puoi visualizzare ulteriori informazioni sui nodi costituenti con l'argomento facoltativo --view=FULL. Per saperne di più, vedi Risolvere i problemi relativi alle query sui pool di lettura.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 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)."]]