Rate limiting parameters·续

  • Data type: Integer
  • Field name in the API: mitigation_timeout

Once the rate is reached, the rate limiting rule applies the rule action to further requests for the period of time defined in this field (in seconds).

In the dashboard, select one of the available values, which vary according to your Cloudflare plan. The available API values are: 0, 10, 60 (one minute), 120 (two minutes), 300 (five minutes), 600 (10 minutes), 3600 (one hour), or 86400 (one day).

Customers on Free, Pro, and Business plans cannot select a duration when using a challenge action — their rate limiting rule will always perform request throttling for these actions. With request throttling, you do not define a duration. When visitors pass a challenge, their corresponding request counter is set to zero. When visitors with the same values for the rule characteristics make enough requests to trigger the rate limiting rule again, they will receive a new challenge.

Enterprise customers can always configure a duration (or mitigation timeout), even when using one of the challenge actions.

Notes for API users

  • If you are on a Free, Pro, or Business plan and are using the API, you must enable request throttling by setting the mitigation_timeout value to 0 (zero) when using the actions managed_challenge, js_challenge, or challenge.
  • Enterprise customers can use a mitigation_timeout value greater than or equal to 0 (zero), regardless of the rate limiting action they select.

With the following behavior

  • Data type: Integer
  • Field name in the API: mitigation_timeout

Defines the exact behavior of the selected action.

Note

Only Enterprise customers can throttle requests using the Block action.

Other users can throttle requests using a challenge action, or perform the action during a period of time. Refer to For duration for details.

The action behavior can be one of the following:

  • Perform action during the selected duration: Applies the configured action to all requests received during the selected duration. To configure this behavior via API, set mitigation_timeout to a value greater than zero. Refer to For duration for more information.Chart displaying the action of a rate limiting rule configured to apply its action during the entire mitigation period
  • Throttle requests over the maximum configured rate: Applies the selected action to incoming requests over the configured limit, allowing other requests. To configure this behavior via API, set mitigation_timeout to 0 (zero).Chart displaying the behavior of a rate limiting configured to throttle requests above the configured limit

Notes about rate limiting characteristics

Use cases of IP with NAT support

Use IP with NAT support to handle situations such as requests under NAT sharing the same IP address. Cloudflare uses a variety of privacy-preserving techniques to identify unique visitors, which may include use of session cookies. Refer to Cloudflare Cookies for details.

Considerations when using IP with NAT support

IP with NAT support relies on a cookie-based visitor identification mechanism (_cfuvid cookie). Keep the following in mind:

  • Visitors who clear cookies, use private browsing, or do not accept cookies will not be individually identified. Requests from these visitors share a single counter bucket, which can cause false positives in high-traffic NAT environments.
  • For security-critical rate limiting (such as protecting login or payment endpoints), combine IP with NAT support with other characteristics like Path or Header value of to reduce the impact of identification gaps.

Incompatible characteristics

You cannot use both IP with NAT support and IP as characteristics of the same rate limiting rule.

Do not use cf.colo.id as a field in expressions

You should not use the cf.colo.id characteristic (data center ID) as a field in rule expressions. Additionally, cf.colo.id values may change without warning. For more information about this rate limiting characteristic, refer to Request rate calculation.

Use a lowercased header name (for API users)

If you use the Header value of characteristic in an API request (with http.request.headers["<header_name>"]), you must enter the header name in lower case, since Cloudflare normalizes header names on the Cloudflare global network.

Missing field versus empty value

If you use the Header value of, Cookie value of, Query value of, Clearance UUID, JSON string value of, lookup_json_integer(...), or Form input value of characteristic and the specific value is not present in the request, the rate limiting rule may still apply to the request, depending on your counting expression.

If you do not filter out such requests, there will be a specific request counter for requests where the field is not present, which will be different from the request counter where the field is present with an empty value.

For example, to consider only requests where a specific HTTP header is present in the context of a specific rate limiting rule, adjust the rule counting expression so it contains something similar to the following:

and len(http.request.headers["<header_name>"]) > 0

Where <header_name> is the same header name used as a rate limiting characteristic.

For Clearance UUID, use http.request.clearance.uuid ne "". This excludes requests without a valid cf_clearance cookie from the clearance counter. Use a separate rule if you also need to rate limit those requests.

If you use Cookie value of as a rate limiting rule characteristic, follow these recommendations:

  • Create a custom rule that blocks requests with more than one value for the cookie.
  • Validate the cookie value at the origin before performing any demanding server operations.

Requirements for using claims inside a JSON Web Token (JWT)

To use claims inside a JSON Web Token (JWT), you must first set up a token validation configuration in API Shield.

Configuration restrictions

  • If the rule filter expression, defined in the When incoming requests match parameter, includes custom lists, you must enable the Also apply rate limiting to cached assets parameter.
  • The rule filter expression cannot contain HTTP response fields.
  • The rule counting expression, defined in the Increment counter when parameter, cannot include both HTTP response fields and custom lists. If you use custom lists, you must enable the Also apply rate limiting to cached assets parameter.
  • When creating a rate limiting ruleset at the account level, the ruleset deployment expression (defining the scope) cannot contain HTTP response fields or custom lists.

Was this helpful?

YesNo

On this page

Rate limiting parameters·续 - 图3Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/waf/rate-limiting-rules/parameters/#page","headline":"Rate limiting parameters","description":"Configurable parameters for rate limiting rules, including expressions and characteristics.","url":"https://developers.cloudflare.com/waf/rate-limiting-rules/parameters/","inLanguage":"en","image":"https://developers.cloudflare.com/waf/rate-limiting-rules/parameters/og.png?v=523c0070a2d11d0d","dateModified":"2026-10-23","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: How Cloudflare tracks and calculates request rates using rule characteristics. title: Request rate calculation image: https://developers.cloudflare.com/waf/rate-limiting-rules/request-rate/og.png?v=64d7fa99a8b21367


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/waf/llms.txt
Use this file to discover all available pages before exploring further.