Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Por padrão, uma instância principal do AlloyDB para PostgreSQL tem alta disponibilidade (HA, na sigla em inglês), com a capacidade de realizar um failover automático para um nó de espera em caso de interrupção. Se o cluster do AlloyDB para PostgreSQL não exigir HA, você poderá reduzir os custos operacionais tornando a instância principal
do cluster uma instância básica, em vez de HA.
Esta página oferece uma visão geral das instâncias básicas. Ele também mostra como realizar os seguintes procedimentos:
Crie uma instância básica em um cluster do AlloyDB.
Mude uma instância básica para uma de alta disponibilidade e vice-versa.
Determine se uma determinada instância é básica ou de alta disponibilidade.
Para uma visão geral mais geral dos clusters e das instâncias do AlloyDB,
consulte Visão geral do AlloyDB.
Visão geral das instâncias básicas
Uma instância básica funciona exatamente como uma instância principal de HA, com uma diferença
importante: ela não tem um nó de espera. Essa arquitetura mais simples faz com que uma instância básica, também conhecida como instância zonal, custe menos para operar do que uma instância HA.
Devido ao nó único, uma instância básica não oferece suporte ao failover automático.
Se a zona que hospeda o nó ativo de uma instância básica tiver uma interrupção, a
instância ficará indisponível para todas as consultas até que a interrupção termine. Esse comportamento
é diferente de uma instância principal de HA, que responde a qualquer interrupção do
nó ativo transformando automaticamente o nó reserva da instância no novo
nó ativo.
Durante as operações de manutenção, uma instância principal de HA e uma instância básica
geralmente têm um tempo de inatividade de manutenção mínimo de menos de um segundo.
As instâncias básicas são adequadas para uso em ambientes de desenvolvimento ou de pré-produção,
que não precisam necessariamente oferecer alta disponibilidade. O Google recomenda
usar apenas instâncias HA, e não básicas, em implantações de produção
de clusters do AlloyDB. As garantias de tempo de atividade fornecidas
pelo SLA do AlloyDB se aplicam apenas a instâncias
de várias zonas. Como as instâncias básicas consistem em apenas um nó em uma única zona, não podemos garantir alta disponibilidade para elas.
Depois de clicar em Criar cluster, selecione Básico ou Básico com
pools de leitura como o tipo de cluster. Em seguida, continue com o processo de criação
do cluster normalmente.
Ao executar o comando gcloud alloydb instances create para criar a instância principal do novo cluster, adicione o argumento --availability-type=ZONAL.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-25 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."]]