Configuring rate limits on the gateway nodes on VMware

Create an env.yaml file on each Gateway node to configure the default rate limit.

The Gateway uses scale limits (instead of strict limits) by default to enforce rate limits. This improves the gateway's performance by providing the ability to handle large amounts of rate-limited traffic.

1. To configure the rate limit, create a file called env.yaml with the settings provided in Table 1:

Table 1. Rate limit settings
Setting Type Default Optoins Comments
USE_RATE_LIMIT_DEFINITION boolean true
  • true

    Use scale limits

  • false

    Use strict limits

Determines the type of rate limiting to use on the Gateway node.
RATE_LIMIT_UPDATE_MODE enumerated prior
  • noneNo limits in a plan are incremented after a limit is reached.
  • all

    All limits in a plan are incremented after a limit is reached.

  • prior

    Retains the behavior from pre-V10 releases: When the plan rate limit is reached, all limits in the plan that are sorted before that plan limit will be incremented.

Determines how the counts within a plan are incremented when a rate limit is hit. Applies only to scale limits.

RATE_LIMIT_SORT_BY_DURATION boolean true
  • true

    Sort the rate limits by duration.

  • false

    Revert to the previous sort order.

Determines the sort order for rate limits in a plan, which in turn determines the sequence in which they are applied.

RATE_LIMIT_USE_OFFSET boolean false
  • true

    Prevent all rate limit counts for an interval from being reset at the same time.

  • false

    Allow all rate limit counts for an interval to be reset at the same time.

Allow or prevent all of the rate limit counts for an interval from being reset at the same time. Preventing the simultaneous reset protects backends from being saturated with requests by resetting the counts for different subscribers of a plan at different points with in the interval. Applies only to scale limits.

RATE_LIMIT_DEFINITION_RESPONSE_HEADERS boolean true
  • true

    Show the x-rate-limit headers.

  • false

    Hide the x-rate-limit headers.

Show or hide the x-rate-limit headers in an API response. Applies only to scale limits.

2. Save the file in the local:/ directory on the Gateway node so that the file persists on reboots of both physical and virtual machines. The settings apply only to the node where the file is stored, so each node in the Gateway cluster requires its own copy of the file.