With weighted DNS resolution for Private Zone, you can configure multiple IP addresses or domain names for the same hostname and DNS query source. Alibaba Cloud DNS returns different record values based on assigned weights, distributing traffic across servers for load balancing.
Prerequisites
Only domains in the accelerated zones of Private Zone support weight settings. Domains in the standard zones do not.
The domain must have multiple A records, AAAA records, or CNAME records that share the same hostname and DNS query source.
Limitations
Category | Supported | Not supported |
Private Zone domain | Accelerated zone | Normal zone |
Record type | A record, AAAA record, and CNAME record. | Other record types. |
DNS record limit | 100 | - |
Weight rules | You can set the weight to an integer from 0 to 100. The default weight ratio is 1:1. If you set the weight of a record to 0, Private Zone does not return its record value. If you set the weights of all records to 0, all record values are returned. | - |
DNS query source | Default, Alibaba Cloud, and custom lines are supported. Note The weights for different DNS query source lines are independent of each other. | Weighted resolution across different DNS query sources. |
For the same hostname and DNS query source:
If multiple domain names are used as record values, only weighted resolution is supported.
If multiple IPv4 addresses are used as record values, configuring a weighted load balancing policy is optional.
If multiple IPv6 addresses are used as record values, configuring a weighted load balancing policy is optional.
Procedure
The following example uses an A record to show how to configure weights for multiple records.
Click Authoritative Zone > User Defined Zones, and find the target domain.
In the Actions column, click Settings.
On the Settings page, click Add Record.
In the Add Record dialog box, for Record Value Load Balancing Policy, select Ratio. Then, in the Record Values section, configure multiple record values and assign a weight to each.
If you select the round robin balancing policy for A or AAAA records, all record values are returned by default.