Traffic throttling for individual requests allows you to limit the downstream speed for all requests that are sent to points of presence (POPs). This way, you can limit the overall peak bandwidth of accelerated domain names. This feature is suitable for scenarios such as game releases and software downloads.
Usage notes
Traffic throttling for individual requests limits the maximum downstream speed of each request between POPs and clients. This feature affects the user experience of file download. Proceed with caution.
If the size of a file is smaller than the size of data that can be downloaded per second, for example, the size of a file is 10 KB and the speed limit is 1 Mbit/s, traffic throttling does not work as expected.
Traffic throttling is suitable for scenarios where the size of files is large. For example, if the size of a file is 500 MB, you can set the speed limit to 1 Mbit/s.
The minimum speed limit for individual requests is 100 KB/s.
If you do not reference a rule from the rules engine when you configure traffic throttling rules, we recommend that you create only one traffic throttling rule. If you create multiple traffic throttling rules and do not reference a rule from the rules engine, the first rule from bottom to top in the list has the highest priority.
If you reference a rule from the rules engine when you configure traffic throttling rules, you can configure multiple traffic throttling rules. If multiple traffic throttling rules are configured (each rule has a reference rule), the traffic throttling rule that takes effect depends on the condition that the user request hits.
Procedure
Log on to the Alibaba Cloud CDN console.
In the left-side navigation pane, click Domain Names.
On the Domain Names page, find the domain name that you want to manage and click Manage in the Actions column.
In the left-side navigation tree of the domain name, click Traffic Throttling.
On the Traffic Throttling for Individual Requests tab, click Create Rule. The following table describes the parameters that you need to configure.
Parameter
Description
Default Limit
The speed limit for individual requests. The minimum value is 100 KB/s.
NoteIf you configure only the Default Limit parameter, the limit takes effect for all requests from the domain name to POPs. If you want to configure other throttling rules, such as throttling for specific periods of time, you can configure the following parameters.
No Throttling
The threshold value based on which throttling is triggered. Default unit: bytes. Default value: 0.
Name of the Custom Throttling Parameter
After you configure a custom throttling parameter, if a request URL includes a throttling parameter, such as rate, POPs perform throttling based on the parameter. The minimum value of the rate parameter is 100 KB/s. If a request URL does not include a throttling parameter, POPs perform throttling based on the default limit.
For example, set the Name of the Custom Throttling Parameter parameter to rate, the Unit of the Custom Throttling Parameter parameter to MB, and the Default Limit parameter to 200 KB/s.
Unit of the Custom Throttling Parameter
The unit of the custom throttling parameter.
Start Time of Throttling
The start time of throttling in the 24-hour format. Valid values: 0 to 24. The start time must be earlier than the end time. Default value: 0.
The local time of the POP server is used. For example, if you set the start time of throttling to 20, throttling starts at 20:00:00 (UTC+8) for users in China and at 20:00:00 (UTC-5) for users in Eastern United States.
End Time of Throttling
The end time of throttling in the 24-hour format. Valid values: 0 to 24. The end time must be later than the start time. Default value: 24.
The local time of the POP server is used. For example, if you set the end time of throttling to 22, throttling ends at 22:00:00 (UTC+8) for users in China and at 22:00:00 (UTC-5) for users in Eastern United States.
Rule Condition
Rule conditions can identify parameters in a request to determine whether a configuration applies to the request.
Do not use conditions
Select the configured rule conditions in Rules Engine. For more information, see Rules engine.
Click OK.
Example
The following figure shows the throttling configuration for the domain name example.aliyundoc.com
.
If a user accesses
https://example.aliyundoc.com/image.jpg
, the server returns the content at the downstream speed of 200 KB/s.If a user accesses
https://example.aliyundoc.com/image.jpg?rate=100
, the server returns the content at the downstream speed of 100 MB/s.