A bandwidth cap specifies the maximum bandwidth value for a domain name. Alibaba Cloud Content Delivery Network (CDN) uses the pay-as-you-go billing method. Therefore, the bill of a billing cycle is issued only after the billing cycle ends. Bills are generated based on the actual resource usage during each billing cycle. The system cannot estimate the resource usage before a billing cycle ends. You can set a bandwidth cap for domain names to prevent unexpected fees generated by traffic spikes.

Background information

After you set a bandwidth cap for a domain name, the domain name is automatically disabled if the average bandwidth value measured during a statistical cycle (one minute) exceeds the specified bandwidth cap. In this case, CDN services are suspended for the domain name and all requests that are destined for the domain name are directly sent to the origin server.
  • If the average bandwidth value measured during a statistical cycle is lower than the specified bandwidth cap, the domain name can use CDN services as expected.
  • If the average bandwidth value measured during a statistical cycle exceeds the specified bandwidth cap, the domain name is automatically disabled. All requests that are destined for the domain name are directly sent to the origin server.
  • Alibaba Cloud CDN does not automatically restore the suspended services even if the average bandwidth value drops below the specified bandwidth cap and no traffic spikes are detected. To restore the suspended services, you must log on to the Alibaba Cloud CDN console and enable the domain name.

Usage notes

  • After you set a bandwidth cap for a domain name, the domain name is disabled if the average bandwidth value measured during a statistical cycle exceeds the specified bandwidth cap. We recommend that you estimate the maximum bandwidth value required by your workloads before you set a bandwidth cap for your domain name. This ensures service availability. Proceed with caution.

    If a domain name is disabled because the specified bandwidth cap is reached, you can log on to the Alibaba Cloud CDN console and navigate to the Domain Names page. On this page, select the domain name that you want to manage, and click Enable in the Actions column to enable the domain name.

  • The monitoring data of bandwidth values may not be up-to-date. A domain name is disabled about 10 minutes after the bandwidth cap set for the domain name is reached. A domain name cannot be disabled more than once within an hour.
  • To allow a Resource Access Management (RAM) user to set bandwidth caps, you must grant the RAM user the required permissions.

    To grant the permissions to a RAM user, you can log on to the RAM console, create the AliyunCDNFullAccess policy, and then attach this policy to the RAM user.

  • You cannot set a bandwidth cap for a wildcard domain name. If you set a bandwidth cap for a wildcard domain name, the bandwidth cap does not take effect.

Caution

The monitoring data of bandwidth values may not be up-to-date. A domain name is disabled about 10 minutes after the bandwidth cap set for the domain name is reached. During this period of time, the actual bandwidth value is higher than the specified cap. CDN services remain available for the domain name. You are charged for the bandwidth resources that are consumed by your CDN service before the domain name is disabled. The following examples show how bandwidth resource are billed during this period of time:

Example 1: Customer A chooses the pay-by-bandwidth metering method for their CDN service and adds only the domain name example.com to Alibaba Cloud CDN. The bandwidth cap of the domain name is set to 10 Gbit/s. From 21:00:00 (UTC+8) on February 1, 2021 to 21:01:00 (UTC+8) on February 1, 2021, the traffic spikes and the actual bandwidth value reaches 10 Gbit/s. The domain name is disabled at 21:11:00 (UTC+8) on February 1, 2021 because the monitoring data of bandwidth values is not up-to-date. Before the domain name is disabled, the actual bandwidth value reaches 15 Gbit/s. In this case, the bandwidth fees that are included in the bill generated on February 1, 2021 are calculated based on the actual bandwidth value, which is 15 Gbit/s.

Example 2: Customer B chooses the pay-by-data-transfer metering method for their CDN service and adds only the domain name example.com to Alibaba Cloud CDN. The bandwidth cap of the domain name is set to 10 Gbit/s. From 21:00:00 (UTC+8) on February 1, 2021 to 21:01:00 (UTC+8) on February 1, 2021, the traffic spikes and the actual bandwidth value reaches 10 Gbit/s. The domain name is disabled at 21:11:00 (UTC+8) on February 1, 2021 because the monitoring data of bandwidth values is not up-to-date. Before the domain name is disabled, the actual bandwidth value reaches 15 Gbit/s. In this case, the bandwidth fees are included in the bill of the billing cycle, which is from 21:00:00 (UTC+8) on February 1, 2021 to 22:00:00 (UTC+8) on February 1, 2021.

The following procedure shows how to set a bandwidth cap for a domain name:

  1. Log on to the Alibaba Cloud CDN console.
  2. In the left-side navigation pane, click Domain Names.
  3. On the Domain Names page, find the domain name that you want to manage and click Manage in the Actions column of the domain name.
  4. In the management pane of the domain name, click Advanced.
  5. Authorize Cloud Monitor to manage your CDN resources.
    1. Click Authorize next to Role Authorization.
    2. On the Cloud Resource Access Authorization page, click Confirm Authorization Policy.
  6. In the Bandwidth Cap section, click Modify.
  7. In the Bandwidth Cap dialog box, turn on Bandwidth Cap and set a bandwidth cap.
    Note
    • The convention between each two neighboring data units is 1,000. For example, 1 Tbit/s is equal to 1,000 Gbit/s, and 1 Gbit/s is equal to 1,000 Mbit/s.
    • You can choose to enable or disable this feature based on your business requirements.
  8. Click OK.