PolarDB for PostgreSQL Distributed Edition is a distributed database service built on PolarDB for PostgreSQL which runs in centralized mode. It uses a two-layer architecture of separated compute nodes (CNs) and data nodes (DNs) to achieve distributed scaling capabilities. This topic describes how to purchase a PolarDB for PostgreSQL Distributed Edition cluster in the PolarDB console.
Prerequisites
You have registered and logged on to an Alibaba Cloud account.
Procedure
Go to the buy page of PolarDB for PostgreSQL Distributed Edition and configure the following parameters.
NoteIf the buy page is displayed abnormally or the PostgreSQL Distributed tab does not exist, contact us.
Section
Parameter
Description
Billing Method
Subscription: an upfront payment model. You select and pay upfront for resources when you create a cluster. The longer the subscription duration, the larger the discount. This method is suitable for business services with predictable and consistent workloads over an extended time period.
Pay-as-you-go: a postpaid model. You select resources but do not need to pay upfront for the resources when you create a cluster. You are charged based on your actual resource usage. This method is suitable for business services with fluctuating or unpredictable workloads.
NoteIf the current billing method of your PolarDB cluster does not meet your business requirements, you can change the billing method at any time based on your actual needs.
Region and Database Engine
Database Engine
Set the value to PolarDB For PostgreSQL Distributed Edition.
Region
The region of the cluster. You cannot change the region after the cluster is created. For more information, see Regions and zones.
NoteMake sure that you deploy the PolarDB cluster in the same region as the Elastic Compute Service (ECS) instance on which your applications run. Otherwise, the cluster and instance cannot communicate with each other over the internal network. They can communicate only over the Internet, which degrades performance.
You can deploy the PolarDB cluster in the same zone as the ECS instance to which you want to connect or in a different zone. Deploying the PolarDB cluster and the ECS instance in the same zone can reduce network latency and increase access speeds.
Creation Method
The method that you want to use to create a PolarDB for PostgreSQL Distributed Edition cluster. The default value is Create Primary Cluster, which creates a new PolarDB cluster.
Database Engine
Set the value to PostgreSQL 14.
Database Edition
Set the value to Enterprise Edition.
Edition
Set the value to Cluster Edition (Recommended).
Specification
Two node types are supported: General-purpose and Dedicated:
Dedicated: The cluster does not share allocated compute resources such as CPUs with other clusters on the same server. This improves the reliability and stability of the cluster.
General-purpose: Idle compute resources such as CPUs are shared among clusters on the same server, which is more cost-effective.
CPU Architecture
Set the value to X86.
Network and Zone
Network Type
Set the value to VPC.
VPC
Select a VPC. Make sure that you deploy the PolarDB cluster in the same region as the Elastic Compute Service (ECS) instance on which your applications run. Otherwise, the cluster and instance cannot communicate with each other over the internal network. They can communicate only over the Internet, which degrades performance.
If an existing VPC meets your network requirements, select the VPC. For example, if you have an existing ECS instance and the VPC to which the ECS instance belongs meets your network requirements, select the VPC.
Otherwise, use the default VPC and the default vSwitch:
Default VPC:
Only one VPC is specified as the default VPC in the region that you select.
The CIDR block of the default VPC uses a 16-bit subnet mask, such as 192.168.0.0/16, and provides up to 65,536 private IP addresses.
The default VPC does not count against the quota of VPCs that you can create.
Default vSwitch:
Only one vSwitch is specified as the default vSwitch in the zone that you select.
The CIDR block of the default vSwitch uses a 20-bit subnet mask, such as 192.168.0.0/20, and provides up to 4,096 private IP addresses.
The default vSwitch does not count against the quota of vSwitches that you can create in a VPC.
If the default VPC and vSwitch cannot meet your requirements, you can create your 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 independent geographical location in a region. All zones in a region provide the same level of service performance.
You can deploy your PolarDB cluster and ECS instance in the same zone or in different zones.
The zone specified here is the primary zone of the PolarDB for PostgreSQL Distributed Edition cluster.
High-availability Mode
The high availability mode of the cluster.
Double Zones (Hot Standby Storage Cluster Enabled): PolarDB deploys the primary cluster, including compute nodes that back up each other and primary storage, together with the hot standby storage cluster in the same region. The two clusters each have three replicas, which adds up to six replicas. This delivers higher SLA than when this feature is disabled.
NoteHot standby storage cluster cannot be disabled after it is enabled.
Single Zone (Hot Standby Storage Cluster Disabled): Only the primary cluster is deployed. The cluster has three replicas, and the storage unit price is half of that when this feature is enabled. This delivers lower SLA than when this feature is enabled.
Secondary Zone
The secondary zone of the cluster.
NoteYou need to configure this parameter only when you set High-availability Mode to Double Zones (Hot Standby Storage Cluster Enabled).
Specifications and Proxy
Compute Node Specification
Configure the specifications and quantity of compute resources. A Distributed Edition cluster includes two types of computing resources: CNs and DNs.
CNs manage cluster metadata and create distributed execution plans.
DNs store actual data shards.
For more information about node specifications, see Computing resource billing rules.
Data Node Specification
Read-only Node for CNs/DNs
You can add one read-only node for CNs or DNs.
Storage
Storage Type
PolarDB supports two storage types: PSL5 and PSL4.
PSL5: the storage type supported in the historical versions of PolarDB. It delivers higher performance, reliability, and availability.
PSL4: a new storage type for PolarDB.PSL4 uses the smart-SSD technology developed by Alibaba Cloud to compress and decompress data at the physical SSD disk level. This can minimize the storage price of data while keeping a high disk performance.
NoteYou cannot change the storage type of an existing cluster. If you want to change the storage type of a cluster, we recommend that you create a new cluster with the desired storage type and then migrate data from the original cluster to the new cluster.
For more information about the two storage types, see How do I choose between PSL4 and PSL5.
Storage Cost
The storage cost. You do not need to configure this parameter. You are charged for the actual storage usage on an hourly basis. For more information, see Billing rules for storage.
NoteYou do not need to specify the storage capacity when you create a cluster. The system automatically scales the storage capacity as the amount of data increases or decreases.
More Configurations (Optional)
Cluster Name
You can select Auto-generated or Custom.
If you select Auto-generated, the system automatically generates a cluster name after the cluster is created. You can modify the automatically generated cluster name.
If you select Custom, you must enter a cluster name. The name must meet the following requirements:
The name cannot start with
http://orhttps://.The name must be 2 to 256 characters in length.
The name must start with a letter and can contain digits, periods (.), underscores (_), and hyphens (-).
Resource Group
Select a resource group from the created resource groups.
NoteA resource group is a group of resources that belong to an Alibaba Cloud account. Resource groups allow you to manage resources in a centralized manner. A resource can belong to only one resource group. For more information, see Classify resources into resource groups and grant permissions on the resource groups.
On the right side of the page, confirm that all parameters (such as Billing Method, Region, Deployment Mode, and Resource Group) meet your business requirements. Then, configure the parameters listed in the following table.
Parameter
Description
Quantity
The number of clusters that you want to purchase.
NoteYou can create a maximum of 50 clusters at a time. This allows you to create multiple clusters in specific scenarios such as deploying multiple game servers at a time.
You can purchase a maximum of 50 clusters with your Alibaba Cloud account.
Duration
You need to configure the Duration of the cluster only when the billing method is Subscription. You also need to specify whether to enable Auto-renewal.
NoteWe recommend that you enable Auto-renewal to prevent service interruptions caused by overdue payments.
View the total cost and detailed cost breakdown (such as compute specifications, storage, and network). Read the terms of service. If you agree to them, click Buy Now. On the Payment page, confirm the order and payment method and click Subscribe.
The cluster is created 10 to 15 minutes after you complete the payment. Then, you can view the newly created cluster on the Clusters page.
If specific nodes in the cluster are in the Creating state, the cluster is being created and is unavailable. The cluster is only available when the cluster is in the Running state.
Make sure that you select the region in which the cluster is deployed when you view the cluster. Otherwise, the cluster will not be displayed.
Related API operations
Operation | Description |
Creates a PolarDB cluster. | |
Queries PolarDB clusters. | |
Queries the attributes of a PolarDB cluster. | |
Queries the auto-renewal status of a subscription PolarDB cluster. | |
Specifies the auto-renewal status of a subscription PolarDB cluster. |