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
Situation Awareness
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

Usage Cap

Updated on 2024-08-22 GMT+08:00

You can set a traffic or bandwidth cap for a domain name. When the usage reaches the cap, CDN acceleration will be disabled for the domain name, reducing high bills caused by traffic theft or attacks.

Scenarios

If your domain name is attacked or has malicious traffic coming, there may be sudden traffic spikes that result in a bill higher than your normal expenditures. In this case, you can enable usage cap. Once the consumed bandwidth or traffic reaches the cap in a specified period, CDN acceleration will be disabled for this domain name.

Precautions

  • Statistics data has a delay of about 10 minutes. When your domain name reaches the cap, CDN acceleration will be disabled about 10 minutes later. The traffic, bandwidth, and number of requests generated during this time are charged.
  • When CDN acceleration is disabled for your domain name, the domain name cannot be accessed (status code 403 is returned). Set a proper usage cap to prevent service loss.
    • After CDN acceleration is disabled for a domain name, the CNAME record will be deleted. If the local DNS has a resolution cache or a user binds the domain name with a CDN PoP in the hosts file to forcibly resolve requests, CDN will refuse to provide services after receiving the requests. However, traffic and request data will be generated. You need to pay for the traffic and request data.
  • Exercise caution when setting a usage cap for a wildcard domain name (for example, *.test.com). The total usage of all subdomain names, such as a.test.com, b.test.com, and c.test.com, is collected. Once the total usage reaches the cap, CDN acceleration is disabled for the wildcard domain name and all subdomain names become inaccessible.
  • You can set usage caps for up to 20 domain names. Each domain name can have only one bandwidth cap rule.
  • You cannot set usage caps for domain names with special configurations.
  • When a domain name reaches the usage cap and CDN is disabled, usage capping will be executed again during the current statistical period. For example:
    • On October 19, 2023, a customer set a traffic cap rule, that is, when the accumulated traffic usage within an hour reaches 400 GB, CDN acceleration will be disabled for 1 hour. From 20:00 to 20:35 on October 25, 2023, the traffic suddenly increased to 400 GB. Due to a delay in monitoring data, CDN acceleration was disabled for this domain name at about 20:41 on October 25, 2023. In this case, usage capping was not executed again from 20:41 to 20:59:59.
  • When the bandwidth or traffic cap is reached, CDN delivers the settings of returning the status code 403 to all PoPs. In this case, there is a delay between the cap being reached and the status code being returned to users.
  • Usage capping is free of charge on CDN. Simple Message Notification (SMN) charges you for alarm notifications sent to you. For details about SMN pricing, see SMN Pricing Details.

Procedure

  1. Log in to Huawei Cloud console. Choose Service List > Content Delivery & Edge Computing > Content Delivery Network.

    The CDN console is displayed.

  2. In the navigation pane, choose Domains.
  3. In the domain list, click the target domain name or click Configure in the Operation column.
  4. Click the Advanced Settings tab and enable the switch next to Usage Cap.
    Figure 1 Setting the usage cap
    Table 1 Parameters

    Parameter

    Description

    Example

    Statistics Type

    Real-time usage: Collects the traffic/bandwidth statistics every 5 minutes.
    • The start time of a statistical period is a multiple of 5 minutes. For example, if a rule is configured at a time from 00:10:01 to 00:14:59, the start time of the first statistical period is 00:10:00 (rounding down to the nearest 5 minutes).

    Accumulated usage/hour: Collects statistics on the traffic accumulated every exact hour. For example, the first statistical period on October 19, 2023 is 00:00:00 to 00:59:59.

    • After a usage cap is set, the first statistical period may be less than one hour. For example, if the usage cap is set at 00:25:00 on October 19, 2023, the usage from 00:25:00 to 00:59:59 is collected in the first statistical period.

    Accumulated usage/day: Collects statistics on the traffic accumulated every day (UTC+08:00). For example, the statistical period on Oct 19, 2023 is 00:00:00 to 23:59:59.

    Real-time usage

    Usage Cap

    For real-time usage, you can set a traffic or bandwidth cap. For accumulated usage, you can only set a traffic cap.

    Bandwidth cap: Collects bandwidth usage every 5 minutes. You can set a bandwidth cap as required.

    Traffic cap: Collects traffic usage in the specified period. You can set a traffic cap as required.

    NOTE:

    The bandwidth and traffic conversion rules for usage capping are the same as those for billing. The default conversion rules are: 1 GB = 1,024 MB and 1 Gbit/s = 1,000 Mbit/s.

    Bandwidth cap

    10 Gbit/s

    Alarm Threshold

    When the ratio of the access traffic/bandwidth to the configured cap reaches the alarm threshold, CDN sends a message to you. The alarm threshold ranges from 10% to 90%.

    80%

    Unblock After

    Duration for disabling CDN after the bandwidth or traffic cap is reached. After the specified duration expires, CDN is automatically enabled for the domain name.

    • Select 60 minutes, 12 hours, 24 hours, 3 days, or Manually. If you select Manually, you need to enable CDN for the domain name on the console if you want to use it again after it is blocked.

    12 hours

  5. Set required parameters and click OK.

Fee Description

The monitoring data has a delay of about 10 minutes. After the actual usage reaches the cap, CDN acceleration will be disabled about 10 minutes later. The traffic and bandwidth generated during this period are charged.

  • Example 1 (billing by peak bandwidth):

    Customer A is billed by peak bandwidth. This customer added domain name example.com to CDN, enabled a bandwidth cap, and set the cap to 15 Gbit/s.

    The bandwidth suddenly increased to 15 Gbit/s from 22:00 to 22:05 on October 10, 2023. Due to the monitoring data delay, CDN acceleration was disabled at about 22:11 on the same day and the peak bandwidth reached 23 Gbit/s. In this case, 23 Gbit/s bandwidth was charged in the bill for peak bandwidth generated on October 10, 2023.

  • Example 2 (billing by traffic):

    Customer B is billed by traffic. This customer added domain name example.com to CDN, enabled a traffic cap, and set the cap to 400 GB.

    From 22:00 to 22:05 on October 10, 2023, the traffic usage surged to 400 GB. Due to the monitoring data delay, CDN acceleration was disabled at about 22:11 on October 10, 2023. The traffic usage during this time reached 550 GB. Any traffic generated before CDN acceleration was disabled was included in the bill of 22:00 to 23:00 on October 10, 2023.

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