PolarDB for PostgreSQL Distributed Edition is a distributed database service built on the centralized architecture of PolarDB for PostgreSQL. It uses a two-layer architecture of compute nodes (CNs) and data nodes (DNs) that decouples compute and storage to provide distributed scalability. This topic describes how to create a PolarDB for PostgreSQL Distributed Edition cluster in the PolarDB console.
Prerequisites
You have registered for and logged in to an Alibaba Cloud account.
Procedure
-
Go to the buy page for PolarDB for PostgreSQL Distributed Edition and configure the following parameters.
NoteIf the buy page does not load correctly or the PostgreSQL Distributed tab is not displayed, contact us for assistance.
Category
Parameter
Description
Billing Method
-
Subscription: A prepaid model. You pay upfront for resources with a fixed specification. Longer subscription periods provide greater discounts. This method is suitable for stable, long-term workloads.
-
pay-as-you-go: A postpaid model where you are billed based on your actual usage. This method is suitable for flexible or unpredictable workloads.
NoteIf you find that the current billing method for your PolarDB cluster does not meet your business needs, you can change the billing method at any time.
Region and Database Engine
Database Engine
Fixed at PolarDB for PostgreSQL (Distributed Edition).
Region
Select the region for your cluster. The region cannot be changed after creation. For more information, see Regions and zones.
Note-
To ensure optimal performance, create your PolarDB cluster in the same region as the ECS instances that will connect to it. Otherwise, they can only communicate over the public internet, which degrades performance and increases latency.
-
You can create PolarDB and ECS in the same zone or in different zones. Creating PolarDB and ECS in the same zone reduces network latency and improves access speed.
Creation Method
Select the creation method for the PolarDB for PostgreSQL Distributed Edition cluster. The default is Create the master cluster, which creates a new PolarDB cluster.
Compatibility
Fixed at PostgreSQL 14.
Service Edition
Fixed at Enterprise Edition.
Edition
Fixed at Cluster Edition (Recommended).
Specification Edition
The following subseries are supported: General-purpose and Dedicated.
-
dedicated: Your cluster exclusively uses its allocated compute resources, such as CPU. Resources are not shared with other clusters on the same physical server, which ensures stable and reliable performance.
-
general-purpose: Different clusters on the same physical server share idle compute resources, such as CPU. This resource multiplexing offers cost savings through economies of scale.
CPU Architecture
Fixed at X86.
Network and Zone
Network Type
Fixed at VPC.
VPC
Select a VPC. Ensure that the PolarDB cluster and the ECS instances that need to connect to it are in the same VPC. Otherwise, they cannot communicate over the internal network, which degrades performance.
-
If you have a suitable VPC, select it. For example, if you have an existing ECS instance, you can select the VPC where it is located.
-
If you do not have a suitable VPC, you can use the default VPC and vSwitch:
-
Default VPC:
-
A default VPC is unique within your selected region.
-
Its CIDR block uses a 16-bit subnet mask, such as 192.168.0.0/16, which provides up to 65,536 private IP addresses.
-
It does not count against your VPC quota.
-
-
Default vSwitch:
-
A default vSwitch is unique within your selected zone.
-
Its CIDR block uses a 20-bit subnet mask, such as 192.168.0.0/20, which provides up to 4,096 private IP addresses.
-
It does not count against the vSwitch quota for the VPC.
-
-
-
If the default VPC and vSwitch do not meet your requirements, you can create a custom VPC and vSwitch. For more information, see Create and manage a VPC.
Zone and vSwitch
Select the Zone and vSwitch for the cluster.
-
A zone is an isolated physical location within a region. Different zones in the same region offer the same level of service.
-
You can create your PolarDB cluster and ECS instances in the same or different zones.
-
The selected zone becomes the primary zone for your PolarDB for PostgreSQL Distributed Edition cluster.
HA Mode
Select a HA Mode.
-
Dual-AZ (Enable Hot Standby Storage Cluster): PolarDB deploys both a primary cluster and a hot standby storage cluster (creating two copies of your storage) in the same region for a higher SLA. In regions that support multiple zones, the hot standby cluster is deployed across zones to provide zone-level disaster recovery.
NoteThis feature cannot be disabled after you enable it.
-
Single-AZ (Disable Hot Standby Storage Cluster)
If you disable the hot standby storage cluster, only a primary cluster (with three data replicas) is deployed. The storage unit price is half that of the Dual-AZ mode, but this results in a lower SLA.
Secondary Zone
Select a Secondary Zone.
NoteThis parameter is required only when HA Mode is set to Dual-AZ (Enable Hot Standby Storage Cluster).
Specification and Proxy
Compute Node Specifications
Configure the specification and quantity of compute resources. A PolarDB for PostgreSQL Distributed Edition cluster contains two types of nodes: compute nodes (CNs) and data nodes (DNs).
-
A compute node (CN) manages cluster metadata and plans distributed queries.
-
A data node (DN) stores data shards.
For more information about node specifications, see Compute resource billing rules.
Data node specification
Number of CN/DN read-only nodes
Fixed at one additional read-only node for both CNs and DNs.
Storage
Storage Type
PolarDB supports two storage types: PSL5 and PSL4.
-
PSL5: The storage type available in previous PolarDB versions. It provides high performance, reliability, and availability.
-
PSL4: A newer, more cost-effective storage type. It uses Alibaba Cloud's proprietary smart-SSD technology to compress and decompress data at the hardware level, which reduces storage costs with minimal performance impact.
NoteThe storage type cannot be changed after a cluster is created. To use a different storage type, you must create a new cluster and migrate your data.
For a detailed comparison of the two storage types, see How do I choose between PSL4 and PSL5.
Storage Fee
This parameter is not configurable. You are billed hourly based on your actual data usage. For more information, see Storage space billing rules.
NoteYou do not need to specify a storage capacity when you create a cluster. The storage capacity scales automatically with your data volume.
More Configurations (Optional)
Cluster Name
Select whether to automatically generate or customize the Cluster Name.
-
If you select to automatically generate the Cluster Name, the system automatically generates a name for the cluster after it is successfully created. You can still modify this name.
-
If you select to customize the Cluster Name, enter a name that meets the following requirements:
-
It cannot start with
http://orhttps://. -
It must be 2 to 256 characters long.
-
It must start with a letter or a Chinese character, and can contain digits, periods (.), underscores (_), and hyphens (-).
-
Resource Group
Select a resource group from your created resource groups.
NoteA resource group is a container for managing a set of related resources under a single Alibaba Cloud account. A resource can belong to only one resource group. For more information, see Resource groups and permissions.
-
-
In the right-side panel, confirm that your configurations, such as Billing Method, Region, Deployment Mode, and Resource Group meet your needs. Then, configure the following parameters:
Parameter
Description
Quantity
Select the number of clusters to create.
Note-
You can create up to 50 clusters at a time. This feature is useful for use cases such as launching multiple game servers in batches.
-
Your Alibaba Cloud account can have a maximum of 50 clusters.
Subscription Duration
This parameter is available only if the Subscription is Subscription. Select a Subscription Duration for the cluster and specify whether to enable auto-renewal.
NoteWe recommend that you enable auto-renewal to prevent service interruptions due to an expired subscription.
Review the total cost and cost breakdown. Read and accept the service agreement and any product-specific terms you have selected. Click Buy Now. On the Payment page, confirm your order details, select a payment method, and then click Pay.
-
After you complete the payment, it takes 10 to 15 minutes to create the cluster. You can then view the new cluster in the cluster list.
-
The cluster is available when its status changes to Running. A Creating status on any node indicates that the cluster is still being provisioned.
-
Make sure that you have selected the correct region to view your newly created cluster.
API reference
|
API |
Description |
|
Creates a database cluster. |
|
|
Returns a list of your database clusters. |
|
|
Returns the detailed attributes of a specific PolarDB cluster. |
|
|
Returns the auto-renewal status of a Subscription cluster. |
|
|
Configures auto-renewal for a Subscription cluster. |