Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Per impostazione predefinita, un'istanza principale AlloyDB per PostgreSQL è ad alta disponibilità (HA), con la possibilità di eseguire un failover automatico su un nodo di riserva in caso di interruzione del servizio. Se il tuo cluster AlloyDB per PostgreSQL non richiede l'HA, hai la possibilità di ridurre i costi operativi impostando l'istanza principale del cluster come istanza di base anziché come istanza ad alta disponibilità.
Questa pagina fornisce una panoramica delle istanze di base. Inoltre, ti mostra come eseguire le seguenti procedure:
Crea un'istanza di base all'interno di un cluster AlloyDB.
Modificare un'istanza di base in un'istanza ad alta disponibilità e viceversa.
Determina se una determinata istanza è di base o HA.
Per una panoramica più generale dei cluster e delle istanze AlloyDB, consulta la panoramica di AlloyDB.
Panoramica delle istanze di base
Un'istanza di base funziona esattamente come un'istanza principale ad alta disponibilità, con una sola differenza fondamentale: non dispone di un nodo di riserva. Questa architettura più semplice rende un'istanza di base, nota anche come istanza zonale, meno costosa da gestire rispetto a un'istanza HA.
A causa del suo singolo nodo, un'istanza di base non supporta il failover automatico.
Se si verifica un'interruzione nella zona che ospita il nodo attivo di un'istanza di base, l'istanza diventa non disponibile per qualsiasi query fino al termine dell'interruzione. Questo comportamento è in contrasto con un'istanza principale HA, che risponde a qualsiasi interruzione del suo nodo attivo trasformando automaticamente il nodo di standby dell'istanza nel nuovo nodo attivo.
Durante le operazioni di manutenzione, sia un'istanza principale HA sia un'istanza di base, tipicamente registrano un tempo di inattività minimo per la manutenzione inferiore a un secondo.
Le istanze di base sono appropriate per l'utilizzo in ambienti di sviluppo o di gestione temporanea,
che non devono necessariamente fornire un'alta disponibilità. Google consiglia vivamente di utilizzare solo istanze HA e non istanze di base nei deployment di produzione dei cluster AlloyDB. Le garanzie di uptime fornite dall'SLA di AlloyDB si applicano solo alle istanze multi-zona. Poiché le istanze di base sono costituite da un solo nodo in un'unica zona, non possiamo garantire l'alta disponibilità per le istanze di base.
Dopo aver fatto clic su Crea cluster, seleziona Base o Base con pool di lettura come tipo di cluster. Quindi, procedi con la procedura di creazione del cluster come di consueto.
Quando esegui il comando gcloud alloydb instances create per creare l'istanza principale del nuovo cluster, aggiungi l'argomento --availability-type=ZONAL.
Creare un'istanza di base per un cluster esistente
[[["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-03 UTC."],[[["\u003cp\u003eAlloyDB basic instances offer a cost-effective alternative to highly available (HA) instances by operating without a standby node, but they do not support automated failover.\u003c/p\u003e\n"],["\u003cp\u003eBasic instances are suitable for development or staging environments where high availability is not a requirement, and are not recommended for production due to the lack of uptime guarantees provided in the AlloyDB SLA.\u003c/p\u003e\n"],["\u003cp\u003eYou can create a new AlloyDB cluster with a basic instance by selecting the "Basic" or "Basic with read pool(s)" option during cluster creation, or by using the \u003ccode\u003e--availability-type=ZONAL\u003c/code\u003e argument in the \u003ccode\u003egcloud alloydb instances create\u003c/code\u003e command.\u003c/p\u003e\n"],["\u003cp\u003eExisting instances can be converted between basic and HA configurations by using the console or the \u003ccode\u003egcloud alloydb instances update\u003c/code\u003e command with either \u003ccode\u003eREGIONAL\u003c/code\u003e (for HA) or \u003ccode\u003eZONAL\u003c/code\u003e (for basic) availability types.\u003c/p\u003e\n"],["\u003cp\u003eYou can check whether an instance is Basic or HA by viewing the details in the console and searching for the "High availability" row, or by using \u003ccode\u003egcloud\u003c/code\u003e and observing the "availabilityType" line.\u003c/p\u003e\n"]]],[],null,["# Reduce costs using basic instances\n\nBy default, an AlloyDB for PostgreSQL primary instance is highly available (HA), with\nthe ability to perform an automated failover to a standby node in\nthe case of an outage. If your AlloyDB for PostgreSQL cluster does not require HA, then\nyou have the option to reduce your operating costs by making the cluster's primary\ninstance a *basic instance*, instead of an HA one.\n\nThis page provides an overview of basic instances. It also shows you how to perform the following procedures:\n\n- Create a basic instance within an AlloyDB cluster.\n\n- Change a basic instance into an HA instance, and vice-versa.\n\n- Determine whether a given instance is basic or HA.\n\nFor a more general overview of AlloyDB clusters and instances,\nsee [AlloyDB overview](/alloydb/docs/overview).\n\nOverview of basic instances\n---------------------------\n\nA basic instance works exactly like an HA primary instance, with one key\ndifference: it lacks a standby node. This simpler architecture makes a basic\ninstance, also known as a *zonal instance*, cost less to operate than an HA\ninstance.\n\nBecause of its single node, a basic instance doesn't support automated failover.\nIf the zone that hosts a basic instance's active node has an outage, then the\ninstance becomes unavailable to any queries until the outage ends. This behavior\nis in contrast with an HA primary instance, which responds to any outage of its\nactive node by automatically turning the instance's standby node into the new\nactive node.\n\nDuring maintenance operations, both an HA primary instance and a basic instance,\ntypically experience minimal maintenance downtime of less than a second.\n| **Warning:** Avoid using basic instances in production. The uptime guarantees of the AlloyDB Service Level Agreement (SLA) apply only to HA instances, not basic instances.\n\nBasic instances are appropriate for use in development or staging environments,\nwhich don't necessarily need to provide high availability. Google strongly\nrecommends using only HA instances, and not basic instances, in production\ndeployments of AlloyDB clusters. The uptime guarantees provided\nby the [AlloyDB SLA](/alloydb/sla) apply only to multi-zone\ninstances. Since basic instances consist of only one node in a single zone, we\ncannot guarantee high availability for basic instances.\n\nCreate a cluster with a basic instance\n--------------------------------------\n\n### Console\n\nFollow the procedure described in [Create a cluster and its primary\ninstance](/alloydb/docs/cluster-create), with the following modification:\n\nAfter clicking **Create cluster** , select either **Basic** or **Basic with\nread pool(s)** as the cluster type. Then, proceed with the cluster creation\nprocess as usual.\n\n### gcloud\n\nFollow the procedure described in [Create a cluster and its primary\ninstance](/alloydb/docs/cluster-create), with the following modification:\n\nWhen running the `gcloud alloydb instances create` command to create the new\ncluster's primary instance, add the argument `--availability-type=ZONAL`.\n\nCreate a basic instance for an existing cluster\n-----------------------------------------------\n\n### Console\n\nFollow the procedure described in [Create a primary\ninstance](/alloydb/docs/instance-primary-create), with the following modification:\n\nIn the **Configure primary instance** pane, under **Zonal availability** ,\nselect **Single zone**.\n\n### gcloud\n\nFollow the procedure described in [Create a primary\ninstance](/alloydb/docs/instance-primary-create), with the following\nmodification:\n\nWhen running the `gcloud alloydb instances create` command to create the\nprimary instance, add the argument `--availability-type=ZONAL`.\n\nUpgrade a basic instance to an HA instance\n------------------------------------------\n\nThis operation effectively brings a new node online, and sets it as the\ninstance's standby. \n\n### Console\n\n1. Go to the **Clusters** page.\n\n [Go to Clusters](https://console.cloud.google.com/alloydb/clusters)\n2. Click the more_vert **Actions**\n column of the primary instance that you want to upgrade from basic to\n HA.\n\n3. Select **Edit**.\n\n4. In the **Edit primary instance** pane, under **Zonal availability** ,\n select **Multiple zones (Highly available)**.\n\n5. Click **Update 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\nupdate`](/sdk/gcloud/reference/alloydb/instances/update) command to turn a\nbasic instance into a highly available one. \n\n gcloud alloydb instances update \u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e \\\n --availability-type=REGIONAL\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 that you are\n updating.\n\n- \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e: The region where the instance is placed.\n\n- \u003cvar translate=\"no\"\u003eCLUSTER_ID\u003c/var\u003e: The ID of the cluster where the instance\n is placed.\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The ID of the project where the cluster\n is placed.\n\nDowngrade an HA instance to a basic instance\n--------------------------------------------\n\nThis operation effectively takes the instance's standby node offline, leaving it\nwith only its active node. \n\n### Console\n\n1. Go to the **Clusters** page.\n\n [Go to Clusters](https://console.cloud.google.com/alloydb/clusters)\n2. Click the more_vert **Actions**\n column of the primary instance that you want to downgrade from HA to\n basic.\n\n3. Select **Edit**.\n\n4. In the **Edit primary instance** pane, under **Zonal availability** ,\n select\n **Single zone**.\n\n5. Click **Update 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\nupdate`](/sdk/gcloud/reference/alloydb/instances/update) command to turn a\nbasic instance into a highly available one. \n\n gcloud alloydb instances update \u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e \\\n --availability-type=ZONAL\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 that you are\n updating.\n\n- \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e: The region where the instance is placed.\n\n- \u003cvar translate=\"no\"\u003eCLUSTER_ID\u003c/var\u003e: The ID of the cluster where the instance\n is placed.\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The ID of the project where the cluster\n is placed.\n\nDetermine whether an instance is HA or basic\n--------------------------------------------\n\n### Console\n\n1. Follow the procedure described in [View instance\n details](/alloydb/docs/instance-view).\n\n2. Find the **High availability** row in the instance's details\n table. It has one of the following values:\n\n - **Highly available:** This instance has more than one node across\n multiple zones, making it HA.\n\n - **No:** This instance has only one node, and is not HA.\n\n### gcloud\n\n1. Follow the procedure described in [View instance\n details](/alloydb/docs/instance-view).\n\n2. Find the `availabilityType` line in the command output.\n\n Its value is either `REGIONAL`, for an HA instance, or `ZONAL`, for a basic\n instance."]]