tencent cloud

Tencent Cloud EdgeOne

Release Notes and Announcements
Release Notes
Security Announcement
Announcements
Product Introduction
Overview
Strengths
Use Cases
Comparison Between EdgeOne and CDN Products
Use Limits
Purchase Guide
Description of Trial Plan Experience Benefits
Free Plan Guide
Billing Overview
Billing Items
Subscriptions
Renewals
Instructions for overdue and refunds
Comparison of EdgeOne Plans
About "clean traffic" billing instructions
DDoS Protection Capacity Description
Getting Started
Choose business scenario
Quick access to website security acceleration
Quick deploying a website with Pages
Domain Service&Origin Configuration
Domain Service
HTTPS Certificate
Origin Configuration
Site Acceleration
Overview
Access Control
Smart Acceleration
Cache Configuration
File Optimization
Network Optimization
URL Rewrite
Modifying Header
Modify the response content
Rule Engine
Image&Video Processing
Speed limit for single connection download
DDoS & Web Protection
Overview
DDoS Protection
Web Protection
Bot Management
API Discovery(Beta)
Edge Functions
Overview
Getting Started
Operation Guide
Runtime APIs
Sample Functions
Best Practices
Pages
L4 Proxy
Overview
Creating an L4 Proxy Instance
Modifying an L4 Proxy Instance
Disabling or Deleting an L4 Proxy Instance
Batch Configuring Forwarding Rules
Obtaining Real Client IPs
Data Analysis&Log Service
Log Service
Data Analysis
Alarm Service
Site and Billing Management
Billing Management
Site Management
Version Management
General Policy
General Reference
Configuration Syntax
Request and Response Actions
Country/region and Corresponding Codes
Terraform
Overview
Installing and Configuring Terraform
Practical Tutorial
Automatic Warm-up/Cache Purge
Resource Abuse/hotlinking Protection Practical
HTTPS Related Practices
Acceleration Optimization
Scheduling Traffic
Data Analysis and Alerting
Log Platform Integration Practices
Configuring Origin Servers for Cloud Object Storage (Such As COS)
CORS Response Configuration
API Documentation
History
Introduction
API Category
Making API Requests
Site APIs
Acceleration Domain Management APIs
Site Acceleration Configuration APIs
Edge Function APIs
Alias Domain APIs
Security Configuration APIs
Layer 4 Application Proxy APIs
Content Management APIs
Data Analysis APIs
Log Service APIs
Billing APIs
Certificate APIs
Origin Protection APIs
Load Balancing APIs
Diagnostic Tool APIs
Custom Response Page APIs
API Security APIs
DNS Record APIs
Content Identifier APIs
Legacy APIs
Ownership APIs
Image and Video Processing APIs
Multi-Channel Security Gateway APIs
Version Management APIs
Data Types
Error Codes
FAQs
Product Features FAQs
DNS Record FAQs
Domain Configuration FAQs
Site Acceleration FAQs
Data and Log FAQs
Security Protection-related Queries
Origin Configuration FAQs
Troubleshooting
Reference for Abnormal Status Codes
Troubleshooting Guide for EdgeOne 4XX/5XX Status Codes
520/524 Status Code Troubleshooting Guide
521/522 Status Code Troubleshooting Guide
Tool Guide
Agreements
Service Level Agreement
Origin Protection Enablement Conditions of Use
TEO Policy
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary
DocumentationTencent Cloud EdgeOnePractical TutorialScheduling TrafficScheduling Traffic to EdgeOne by Performing Canary Switching

Scheduling Traffic to EdgeOne by Performing Canary Switching

PDF
Focus Mode
Font Size
Last updated: 2025-07-28 10:24:05
This document describes how to perform canary switching to smoothly migrate the business traffic of a domain name from its origin to Tencent Cloud EdgeOne by using the traffic scheduling feature.




Purpose

It may take you 10 minutes to read this document, which helps you:
1. Understand what is traffic scheduling management.
2. Understand how to use the traffic scheduling feature to perform canary switching for traffic migration while guaranteeing high service availability.

Background

After you purchase the Tencent Cloud EdgeOne service, you need to switch the traffic of your website from the origin or other service providers to EdgeOne. A conventional solution requires you to use a tool and access a node for testing and, if the test succeeds, switch the traffic once and for all with one click. This may cause issues in some regions, resulting in availability degradation or bursts of traffic at the origin.

A better solution is to perform canary switching to achieve smooth business migration with guaranteed high service availability. EdgeOne provides the traffic scheduling feature for you to control the canary switching progress by specifying custom traffic migration ratios.

Prerequisites

1. You have added a site, purchased the EdgeOne Enterprise plan, and connected the site to EdgeOne in CNAME access mode. For more information, see Adding Sites.
2. You have added the domain name for canary switching in the EdgeOne console. For more information, see Connecting via CNAME.

Use Cases

Assume that you want to migrate the traffic of a site, whose domain name is huidu.example.com. Currently, the traffic is fully directed to the origin server, whose address is origin.example.com.
You plan to switch the traffic to EdgeOne in canary mode by specifying the traffic migration ratio of 1% for the first stage, 30% for the second stage, and 100% for the third stage.

Directions

Step 1. Add an initial canary switching policy

1. Log in to the Tencent Cloud EdgeOne console, enter Service Overview in the left menu bar, and click the site to be configured under Website Security Acceleration.
2. On the site management page, choose Domain Name Service > Traffic Scheduling in the left sidebar. On the Traffic Scheduling page, click Add scheduling policy.


3. In the Select domain name step, select huidu.example.com from the Access domain name drop-down list and click Create.


4. In the Add service provider step, specify a custom service provider name, such as origin domain name, and enter origin.example.com as the origin domain name. This is because the traffic is migrated from the origin in this example. Then, click Next.


5. In the Configure policy step, add an initial canary switching policy and click Submit. Set the weight of the service provider origin domain name to 99 and that of EdgeOne to 1. This policy means to switch 1% of traffic from the origin to EdgeOne. You can increase the traffic migration ratio later if the service remains stable.



Step 2. Start canary switching

1. Configuring DNS

After you added the policy, EdgeOne assigns a CNAME record for traffic scheduling to the domain name. The assigned CNAME record is the same as the default CNAME record of the domain name. You need to configure the CNAME record at your DNS service provider to activate the traffic scheduling policy. For more information, see Step 4 in Connecting via CNAME.



2. Verifying the switching result

You can run the nslookup or dig command to check the switching result.
Windows
macOS or Linux
Open the command prompt and run nslookup -qt=cname huidu.example.com. Then, check the ratio of the CNAME addresses in the DNS result.

In this example, you have specified the traffic migration ratio of 1%. Therefore, if the traffic switching is successful, about 1% of the returned CNAME addresses are provided by EdgeOne. You can run the command several times.


Open the terminal and run dig huidu.example.com. Then, check the ratio of the CNAME addresses in the DNS result.

In this example, you have specified the traffic migration ratio of 1%. Therefore, if the traffic switching is successful, about 1% of the returned CNAME addresses are provided by EdgeOne. You can run the command several times.



3. Viewing traffic changes

Choose Data Analysis > Traffic Analysis in the left sidebar and filter the traffic by setting the filter to Host / Equal to / huidu.example.com. Then, view the changes of the traffic trend curves. For example, if the total bandwidth is 100 Mpbs and 1% of the traffic is switched to EdgeOne, the bandwidth curve will raise to 1 Mbps.




Step 3. Increase the traffic migration ratio

To increase the traffic migration ratio to 30%, go to the Traffic Scheduling page, find huidu.example.com, and click Manage in the Operation column. On the page that appears, change the weight of EdgeOne to 30 and that of the origin to 70, and click Save. The policy will take effect after the DNS cache expires. Then, verify the switching result. For more information, see 2. Verifying the switching result in Step 2.




Step 4. Switch the traffic in full

Perform the following operations to increase the traffic migration ratio to 100% and fully switch the traffic to EdgeOne.
1. Delete the service provider origin domain name and click Save. The policy will take effect after the DNS cache expires. Then, verify the switching result. For more information, see 2. Verifying the switching result in Step 2.


2. You can disable and delete the traffic scheduling policy later if the service remains stable after 100% canary switching. At this point, disabling or deleting the policy has no impact on the service, and the traffic is fully managed by EdgeOne.


Relevant Documentation

Scheduling Traffic to Multiple Service Providers


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback