Help Center/
Ubiquitous Cloud Native Service/
User Guide/
Traffic Distribution/
Creating a Traffic Policy
Updated on 2024-06-17 GMT+08:00
Creating a Traffic Policy
- Log in to the UCS console. In the navigation pane, choose Traffic Distribution.
- On the Traffic Distribution page, click Create Traffic Policy.
- On the page displayed, enter the domain name and add at least one scheduling policy. To create traffic policies for multiple domain names, repeat 3 to 5.
- Domain name: The domain name prefix can be customized. The suffix is the public zone that has been licensed and has created a Huawei Cloud DNS record set.
The prefix consists of multiple strings separated by periods (.) and only allows letters, digits, and hyphens (-). Do not start or end with a hyphen (-). The maximum characters of a string are 63, and the maximum total characters of a domain name is 254.
- If there is no subdomain name, leave the domain name prefix blank.
- The domain name suffix is the public zone that has been resolved in DNS. You can manage domain names on the DNS console. For details, see Public Zone Management.
- Scheduling Policy: Traffic can be scheduled based on user locations and service policies. For details, see 4.
- Domain name: The domain name prefix can be customized. The suffix is the public zone that has been licensed and has created a Huawei Cloud DNS record set.
- Click to add a scheduling policy and click OK, as shown in Figure 1. To add different scheduling policies for the same domain name, repeat this step. You can also add more scheduling policies later.
- Cluster: Select a cluster in Running state. All clusters taken over by UCS are displayed.
- Namespace: namespace that the Service belongs to. The default value is default.
- Service: Select a Service. Only LoadBalancer Services can be selected.
- Line Type:
- Default: (mandatory) returns the default resolution result if no line is matched.
- ISP line: routes visitors to the optimal address based on the carrier networks they use. Defaults to China Telecom/Default regions. You can specify a carrier and region down to province.
- Region line: routes visitors to the optimal address based on their geographic locations. The value defaults to Chinese Mainland/Default regions. You can select a global region. For Chinese Mainland, the region granularity is province. For Global, the region granularity is country/region.
You need to create a Default scheduling policy as the default resolution, and then add a custom scheduling policy. If no default line record set is added for the domain name, access to regions beyond the specified line will fail.
- TTL: specifies cache duration of the record set on a local DNS server. The default value is 300s/5 minutes. If your service address changes frequently, set TTL to a smaller value.
- Weight: If a resolution line in a domain name contains multiple record sets of the same type, you can set different weights to each record set. For details, see Configuring Weighted Routing.
- Click Create. The traffic policy is successfully created.
Figure 2 Creating a traffic policy successfully
Parent topic: Traffic Distribution
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot