Alibaba Cloud CDN allows you to configure bandwidth caps to prevent bandwidth spikes. This topic describes bandwidth caps and how to configure bandwidth caps.

Feature overview

A bandwidth cap specifies the maximum bandwidth value and limits the amount of bandwidth resources that can be consumed. If the average bandwidth value of a domain name in a statistical period (1 minute) reaches the specified bandwidth cap, Alibaba Cloud CDN suspends CDN services for the domain name and maps the domain name to offline.***.com. The offline.***.com domain name is considered invalid. In this case, the domain name becomes inaccessible.

  • If the average bandwidth value that is measured during a statistical period is less than the specified bandwidth cap, the domain name can use CDN services as expected.
  • If the bandwidth value of a domain name reaches the specified bandwidth cap due to traffic spikes, the domain name is automatically disabled and mapped to offline.***.com. The offline.***.com domain name is considered invalid. In this case, the domain name becomes inaccessible.
  • Alibaba Cloud CDN does not automatically restore the suspended CDN services even if the average bandwidth value drops below the specified bandwidth cap. To restore the suspended CDN services, you must log on to the Alibaba Cloud CDN console and enable the domain name. For more information, see Restore CDN services.

Precautions

  • You cannot configure a bandwidth cap for a wildcard domain name. If you configure a bandwidth cap for a wildcard domain name, the bandwidth cap does not take effect.
  • After you configure a bandwidth cap for a domain name, the domain name is automatically disabled if the average bandwidth value that is measured during a statistical period reaches the specified bandwidth cap. Before you configure a bandwidth cap for your domain name, we recommend that you estimate the maximum bandwidth value that is required by your workloads to ensure service availability.
  • The monitoring data of bandwidth values may be delayed by a short period of time. As a result, a domain name is automatically disabled approximately 10 minutes after the bandwidth cap for the domain name is reached.
  • A RAM user can configure bandwidth caps only after you grant the RAM user the required permissions.

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

  • A bandwidth cap does not throttle bandwidth. If the average bandwidth value that is measured during a statistical period reaches the specified bandwidth cap, the domain name is automatically disabled. The bandwidth throttling feature throttles bandwidth for a domain name if the bandwidth value reaches the specified upper limit.
  • You can configure bandwidth caps for up to 20 domain names in the Alibaba Cloud CDN console. One domain name can have only one bandwidth cap. If you configure bandwidth caps for more than 20 domain names after the bandwidth cap feature is enabled, the configuration results for the excess domain names are not displayed in the Alibaba Cloud CDN console. If you still want to configure bandwidth caps for the excess domain names, you must go to the Alibaba Cloud CloudMonitor console. For more information, see View or modify alert rules in CloudMonitor.

Enable or disable the bandwidth cap feature

  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.
    域名管理
  4. On the Domain Names page, click the domain name that you want to manage and then click Traffic Throttling.
  5. Optional: The first time that you enable the bandwidth cap feature, grant CloudMonitor access permissions on Alibaba Cloud CDN.
    1. Click Authorize to the right of Role Authorization.
    2. On the Cloud Resource Access Authorization page, click Confirm Authorization Policy.
  6. In the Bandwidth Cap section, click Modify.
  7. Enable or disable the bandwidth cap feature based on your business requirements.
    • Enable bandwidth cap: Turn on Bandwidth Cap and configure a bandwidth cap.
      Note The conversion between 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.
    • Disable bandwidth cap: Turn off Bandwidth Cap.
  8. Click OK.

View or modify alert rules in CloudMonitor

After you turn on Bandwidth Cap, Alibaba Cloud CDN uses the monitoring and alerting feature of CloudMonitor. An alert rule is created in CloudMonitor to monitor bandwidth values for Alibaba Cloud CDN. If the alert rule is triggered, notifications are sent to the contacts that are specified in CloudMonitor.

If you want to change the contacts or view alerts, you can perform the following operations in the CloudMonitor console:

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, choose Alerts > Alert Rules.
    CloudMonitor
  3. Change the contacts or view alerts.
  4. View the alert rules of a specified domain name.
    To query the alert rules of a specified domain name, enter the domain name that you want to query in the search box on the Alert Rules page and then click the search icon. Query the alert rules of a specified domain name

Restore CDN services

Alibaba Cloud CDN does not automatically restore the suspended CDN services even if the average bandwidth value drops below the specified bandwidth cap. To restore the suspended CDN services, you must log on to the Alibaba Cloud CDN console and enable the domain name. To enable a domain name, perform the following operations:

Log on to the Alibaba Cloud CDN console and go to the Domain Names page. Then, select the domain name that you want to enable and click Enable in the Actions column.

Billing rules

The monitoring data of bandwidth values may be delayed by approximately 10 minutes. Therefore, Alibaba Cloud CDN takes approximately 10 minutes to disable a domain name after the bandwidth cap of the domain name is reached. During this period of time, you are charged for the bandwidth resources that are consumed. The following examples show how bandwidth resources are billed during this period of time:

  • Example 1: pay-by-peak-bandwidth

    Customer A selects the pay-by-peak-bandwidth metering method and adds only the example.com domain name 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 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 delayed by 10 minutes. Before the domain name is disabled, the actual bandwidth value reaches 25 Gbit/s. In this case, the bandwidth fees that are included in the bill that is generated on February 1, 2021 are calculated based on the actual peak bandwidth value of 25 Gbit/s.

  • Example 2: pay-by-data-transfer

    Customer B selects the pay-by-data-transfer metering method and adds only the example.com domain name 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 actual bandwidth value reaches 10 Gbit/s. During this period of time, 30 GB of data transfer is generated. The domain name is disabled at 21:11:00 (UTC+8) on February 1, 2021 because the monitoring data of bandwidth values is delayed by 10 minutes. Before the domain name is disabled, 400 GB of data transfer is generated. In this case, the data transfer fees are included in the bill for the billing cycle from 21:00:00 (UTC+8) on February 1, 2021 to 22:00:00 (UTC+8) on February 1, 2021.