Rate Limiting

policies/rate_limiting[]

The gateway can apply rate limiting to incoming requests. This entry defines the rate limiting policies and where they will be applied. Refer to the documentation for information about how to author a rate-limiting policy.
This entry is an array and can be used to define multiple policies.

Properties

NameTypeConstraintsDescription
namestringThe name to be associated with this rate limiting rule.
methodsArray of stringThe methods to which this rate limiting rule will be applied. If the wildcard "*" is specified all methods will be matched.
pathsArray of stringThe paths to which this rate limiting rule will be applied. The path supports wildcards. This entry is an array and can be used to specify multiple paths. Note that the policy will be duplicated and applied for each specified path, multiple paths do not share a common request bucket. To share a common request bucket for multiple paths, provide a single path pattern which matches all required paths.
rulestringThe rate limiting rule.

Example

policies:
  rate_limiting:
    - name: rate_policy_A
      methods:
        - GET
        - POST
      paths:
        - "/test*"
        - "/release*"
      rule: |
        ip: true
        capacity: 3
        interval: 60
        reaction: TEMPLATE