Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Creating a Traffic Policy

Updated on 2023-04-12 GMT+08:00

UCS intelligently distributes application requests and supports functions such as traffic splitting, grayscale release, and failover.

Prerequisites

  • You have connected a Kubernetes cluster to UCS and enabled network access for the cluster. For details, see Quickly Connecting an Attached Cluster.
  • A LoadBalancer Service has been created for the cluster.
  • An approved public domain name has been added to Huawei Cloud DNS record set. For details, see Creating a DNS Record Set.

Procedure

Assume that your services are deployed in multiple regions. By default, users in China access your services in the CN North-Beijing4 region, and users in Asia Pacific will be served in the AP-Singapore region to reduce the latency. In this case, you can create a traffic policy to split traffic for applications by region.

  1. Log in to the UCS console.
  2. In the navigation pane, choose Traffic Distribution.
  3. Click Create Traffic Policy in the upper right corner.
  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, set only key parameters listed in Table 1 and 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 Running state. All clusters taken over by UCS are displayed.

    Namespace

    Namespace to which the Service belongs. Defaults to default.

    Service

    Select a Service. Only LoadBalancer Services can be selected.

    Line Type

    • 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. 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.
    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 Record Sets Have Taken Effect?

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

    nslookup demo.***.com

    NOTE:

    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 the IP address of Address is the load balancer IP of the target cluster, the scheduling policy takes effect.

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

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback