All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

Configure throttling

Last updated:2020-11-26 19:51:15

Overview

You can configure bandwidth throttling for a domain name to control the costs and prevent network attacks.

Notes:

  • This feature is disabled by default.
  • This feature is not applicable to a wildcard domain name.
  • Even if a throttling policy is configured, the real-time bandwidth may exceed the specified threshold.
  • A throttling policy takes effect about 10 seconds later after the total bandwidth of all requests exceeds the threshold.

Procedure

Turn on or off SpeedLimit.

51.jpg

Redirect requests to the origin after the throttling is activated

Overview

You can specify an origin address so that new requests are redirected to the origin address based on HTTP status code 302 after the total bandwidth exceeds the threshold.

Procedure

Turn on SpeedLimit.

Edit BandwidthThresholdValue and set the unit to Gbps or Mbps.

Set Excess strategy to Access back-to-origin and enter the back-to-origin domain name or IP address.

Click Save The Configuration.

52.jpg

Notes:

  • The bandwidth uses the base 1000 numeral system.
  • You can enter one back-to-origin domain name or multiple back-to-origin IP addresses.
  • If you enter multiple back-to-origin IP addresses, requests are sent to the IP addresses in round robin mode.

Reject requests and return a custom status code after the throttling is activated

Overview

You can configure an error code so that new requests are rejected and the error code is returned after the total bandwidth exceeds the threshold.

Procedure

Turn on SpeedLimit.

Edit BandwidthThresholdValue and set the unit to Gbps or Mbps.

Set Excess strategy to Response status code and select a status code for StatusCodeSetting.

Click Save The Configuration.

53.jpg

Limit the bandwidth of requests after the throttling is activated

Overview

You can configure a bandwidth limit so that all requests are limited by this bandwidth limit after the total bandwidth exceeds the threshold.

Procedure

Turn on SpeedLimit.

Edit the BandwidthThresholdValue and set the unit to Gbps or Mbps.

Set Excess strategy to SpeedlimitVisit and set a value for SpeedLimitSetting.

Click Save The Configuration.

54.jpg

Notes:

  • The bandwidth limit cannot be lower than 2000 Kbit/s.
  • If the total bandwidth exceeds the threshold, the bandwidth of new connections will be reduced to the specified bandwidth limit. If the number of connections soars, there is a probability that the total bandwidth exceeds the threshold.

Example

For the domain name zyf0221.test.com, the bandwidth threshold is set to 20 Gbit/s, the throttling policy is set to Response status code, and the status code is set to 403.

55.jpg

Kingsoft Cloud CDN monitors the bandwidth of this domain name every 10s. When Kingsoft Cloud CDN detects that the total bandwidth exceeds 20 Gbit/s, Kingsoft Cloud CDN delivers the throttling configuration so that the status code 403 is returned for all new requests. It takes some time to deliver the configuration to all edge nodes. Therefore, the total bandwidth will increase slightly and then drop to less than 20 Gbit/s.

On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback