Редактиране

Споделяне чрез


Scale a cluster in Azure Cosmos DB for PostgreSQL

APPLIES TO: Azure Cosmos DB for PostgreSQL (powered by the Citus database extension to PostgreSQL)

Azure Cosmos DB for PostgreSQL provides self-service scaling to deal with increased load. The Azure portal makes it easy to add new worker nodes, and to increase the vCores and storage for existing nodes.

Adding nodes causes no downtime, and even moving shards to the new nodes (called shard rebalancing) happens without interrupting queries.

Add worker nodes

  1. On the portal page for your cluster, select Scale from the left menu.

  2. On the Scale page, under Nodes, select a new value for Node count.

    Resource sliders

  3. Select Save to apply the changed values.

Note

Once you increase nodes and save, you can't decrease the number of worker nodes by using this Scale page.

Note

To take advantage of newly added nodes you must rebalance distributed table shards, which means moving some shards from existing nodes to the new ones. Rebalancing can work in the background, and requires no downtime.

Increase or decrease vCores on nodes

You can increase the capabilities of existing nodes. Adjusting compute capacity up and down can be useful for performance experiments, and short- or long-term changes to traffic demands.

To change the vCores for all worker nodes, on the Scale screen, select a new value under Compute per node. To adjust the coordinator's vCores, expand Coordinator and select a new value under Coordinator compute.

Note

You can scale compute on cluster read replicas independent of their primary cluster's compute.

Note

There is a vCore quota per Azure subscription per region. The default quota should be more than enough to experiment with Azure Cosmos DB for PostgreSQL. If you need more vCores for a region in your subscription, see how to adjust compute quotas.

Increase storage on nodes

You can increase the disk space of existing nodes. Increasing disk space can allow you to do more with existing worker nodes before needing to add more worker nodes.

To change the storage amount for all worker nodes, on the Scale screen, select a new value under Storage per node. To adjust the coordinator node's storage, expand Coordinator and select a new value under Coordinator storage.

Note

Once you increase storage and save, you can't decrease the amount of storage.

Choose preferred availability zone

You can choose preferred availability zone for nodes if your cluster is in an Azure region that supports availability zones. If you select preferred availability zone during cluster provisioning, Azure Cosmos DB for PostgreSQL provisions all cluster nodes into selected availability zone. If you select or change preferred availability zone after provisioning, all cluster nodes are moved to the new preferred availability zone during next scheduled maintenance.

To select preferred availability zone for all cluster nodes, on the Scale screen, specify a zone in Preferred availability zone list. To let Azure Cosmos DB for PostgreSQL service select an availability zone for cluster, choose 'No preference'.

Next steps