Updated on 2024-11-26 GMT+08:00

Request Rate Limiting

You can limit the user request rate within a specific range to reduce costs and the risk of burst bandwidth.

Precautions

  • Rate limiting takes effect for all user requests to the domain name, which affects the acceleration effect and user experience.
  • You can configure up to 60 rate limiting rules.
  • You can configure only one rate limiting rule for All files.

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.
  5. In the Request Rate Limiting area, click Edit.
  6. Click Add to add a rule.
    Figure 1 Configuring request rate limiting
    Table 1 Parameters

    Parameter

    Description

    Content Type

    • All files
    • Directory: files in a specific directory

    Content

    • This parameter is left blank when Content Type is set to All files.
    • When Content Type is set to Directory, specify this parameter.
      1. Start with a slash (/), for example, /test/folder.
      2. Do not end with a slash (/).
      3. Enter one directory per rule.

    Rate Limit Type

    Rate limiting by transmission traffic is supported. That is, when the traffic of a single HTTP request reaches the specified value, the access speed is limited. The access speed of subsequent requests cannot exceed the specified rate limit.

    Rate Limit Condition

    Volume of the transmitted traffic that triggers rate limiting.

    • The unit is byte. The maximum value is 1 GB, that is, 1,073,741,824 bytes.

    Rate Limit

    Maximum access speed when rate limiting starts.

    • The maximum value is 100 Mbit/s.

    Priority

    Priority of a rate limiting rule. Each cache rule must have a unique priority. If multiple rate limiting rules are configured for a resource, CDN uses the rate limiting rule with the highest priority.

    • Enter an integer ranging from 1 to 100. A greater number indicates a higher priority.
  7. Set required parameters and click OK.