Updated on 2025-11-17 GMT+08:00

Managing Traffic of Multiple Clusters

UCS intelligently distributes application requests across clouds and regions and supports functions such as traffic splitting, grayscale releases, and failovers.

Prerequisites

Procedure

Assume that your application is deployed in multiple regions. Users in Chinese Mainland access the application in CN North-Beijing4, while users in Asia Pacific will be served in AP-Singapore to reduce the latency. In this case, you can create a traffic policy to split traffic for the application by region.

  1. Log in to the UCS console.
  2. In the navigation pane, choose Traffic Distribution.
  3. In the upper right corner, click Create Traffic Policy.
  4. Select the domain name added to the record set and enter the domain name prefix as prompted. If there is no subdomain name, the domain name prefix can be left blank.
  5. Add a scheduling policy. In this example, only key parameters listed in Table 1 are configured. Retain the default values for other parameters. To create traffic policies for users in different regions, repeat this step and select different clusters and line types.

    Table 1 Key parameters of a scheduling policy

    Parameter

    Description

    Cluster

    Select a cluster in the Running state. All clusters taken over by UCS are displayed.

    Namespace

    Select the namespace that the Service belongs to. The default value is Default.

    Service

    Select a Service. Only Services of the LoadBalancer type can be selected. The available Services will be displayed.

    Line Type

    • ISP line: routes visitors to the optimal address based on the carrier networks they use. The default value is 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 default value is Chinese Mainland/Default regions. You can select any region. For Chinese Mainland, the region granularity is province. For Abroad, the region granularity is country/region.
    Figure 1 Adding a scheduling policy

  6. Click OK. Under this traffic policy, users in Asia Pacific will preferentially access the specified line.
  7. Check whether the scheduling policy takes effect. For details, see How Do I Check Whether a Record Set Has Taken Effect?

    You can use a device that has connected to the Internet in Asia Pacific and run the following command to check whether the scheduling policy takes effect:

    nslookup demo.***.com

    If the device OS does not support the nslookup command, manually install it first. For example, if you are using a CentOS device, run the yum install bind-utils command first.

    If the following information is displayed and Address is the IP address of the load balancer for the target cluster, the scheduling policy takes effect.

    Server: ***
    Address: *.*.*.*
    
    Non-authoritative answer: 
    Name: demo.***.com
    Address:  124.*.*.*