This topic describes how to create a PolarDB for PostgreSQL cluster in the console.
An Alibaba Cloud account is registered and is used to log on to the Alibaba Cloud Management Console. For more information, see Register and log on to an Alibaba Cloud account.
A cluster contains one primary node and a maximum of 15 read-only nodes. At least one read-only node is required to implement active-active high availability architecture. A node is a virtual database server, where you can create and manage multiple databases.
ApsaraDB for PolarDB supports Virtual Private Cloud (VPC) only. VPC is an isolated network in Alibaba Cloud that is more secure than a classic network.
- To achieve optimal performance, use ApsaraDB for PolarDB with Elastic Compute Service (ECS) and place them in the same VPC. If your ECS instance is created in a classic network, you must migrate it to a VPC.
- Log on to Alibaba Cloud.
- Click Create Cluster to go to the ApsaraDB for PolarDB purchase page.
- Select Subscription or Pay-As-You-Go.
- Subscription: You must pay for the compute nodes (a primary node and a read-only node) when you create the cluster. Storage consumed by your database is billed in GB/hour increments and the charges are deducted from your account on an hourly basis. The Subscription method is more cost-effective if you want to use the new cluster for a long period of time. The longer the subscription period, the greater the discount.
- Pay-As-You-Go: This method does not require any upfront payment. Compute nodes and storage consumed by your database are billed on an hourly basis and the charges are deducted from your account on an hourly basis. The Pay-As-You-Go method is suitable if you only want to use the new cluster for a short period of time. You can save costs by releasing clusters as needed.
- Configure the following parameters.
Console section Parameter Description Basic Region The region where the cluster resides. You cannot change the region after you confirm your order.Note Make sure that you place your cluster in the same VPC as the ECS instance you want to connect to. Otherwise, they cannot communicate through the internal network and achieve optimal performance. Create Type The method to create an ApsaraDB for PolarDB cluster.
For the PostgreSQL engine, choose Create Primary Cluster.
Primary Availability Zone
- The zone of the cluster. Zones are independent physical areas in one region. There are no differences between the zones.
- Your cluster and the ECS instance to be connected can be located in the same zone or in different zones.
- You do not need to specify this parameter.
- ApsaraDB for PolarDB supports VPC only. A VPC is an isolated virtual network with higher security and performance than a classic network.
Make sure that you place your cluster in the same VPC as the ECS instance you want to connect to. Otherwise, they cannot communicate through the internal network and achieve optimal performance.
- If you have created a VPC that meets your network plan, select the VPC. For example, if you have created an ECS instance and the VPC where it resides meets your network plan, select this VPC.
- Alternatively, use the default VPC and VSwitch.
- Default VPC:
- It is a unique VPC in your selected zone.
- The network mask for a default VPC has 16 bits, such as 172.31.0.0/16, providing up to 65,536 internal IP addresses.
- It is not included in the total number of VPCs that you can create.
- Default VSwitch:
- It is a unique VSwitch in your selected zone.
- The network mask for a default VSwitch has 20 bits, such as 172.16.0.0/20, providing up to 4,096 private IP addresses.
- The default VSwitch is not included in the total number of VSwitches that you can create in a VPC.
- Default VPC:
- If the default VPC and VSwitch cannot satisfy your requirements, you can create your own VPC and VSwitch.
Instance Database Engine Fully compatible with PostgreSQL 11. Node Specifications Select the specifications as needed. All ApsaraDB for PolarDB nodes are dedicated, providing stable and reliable performance. For more information, see Specifications and pricing. Number of Nodes
- You do not need to specify this parameter. By default, the system will create a read-only node that has the same specifications as the primary node.
- If the primary node fails, the system automatically promotes the read-only node as the primary node, and generate a new read-only node.
- For more information about read-only nodes, see Architecture.
Storage Cost You do not need to specify this parameter. The system will charge you on an hourly basis based on the actual data usage. For more information, see Specifications and pricing.Note You do not need to select a storage capacity when you purchase a cluster. The storage capacity will automatically resize based on your data usage.
- Specify Purchase Plan (only applicable to subscription clusters) and Number, and click Buy Now.Note A maximum of 50 clusters can be created at a time, which is suitable for business scenarios such as launching multiple gaming servers at a time.
- On the Confirm Order page, confirm your order information, read and accept the ApsaraDB for PolarDB Subscription Agreement of Service, and then click Pay.After the payment is completed, the cluster is created in about 10 minutes. The created cluster is displayed in the cluster list.Note
- The cluster is unavailable and is still being created if some of the nodes are in the Running state. The cluster is available only when the cluster is in the Running state.
- Make sure that you have selected the correct region. Otherwise, you cannot view your clusters.
Create database accounts. For more information, see Create a database account.
Related API operations
|CreateDBCluster||Creates a PolarDB cluster.|
|DescribeDBClusters||Lists PolarDB clusters.|
|DescribeDBClusterAttribute||Used to view the attributes of a PolarDB cluster.|
|DescribeAutoRenewAttribute||Used to query the automatic renewal status of a PolarDB cluster that uses the Subscription billing method.|
|ModifyAutoRenewAttribute||Used to set the automatic renewal status of a PolarDB cluster that uses the Subscription billing method.|