Skip to main content

Rate Limit

Rate limiting is a crucial plugin for ensuring the stability and security of your API. By implementing rate limiting, you can prevent abuse and excessive requests to your server.

Usage

vulcan.yaml
rate-limit:
enabled: true
options:
interval:
min: 1
max: 10000

Settings

SettingDefaultTypeDescription
enabledtruebooleanEnable or disable rate limit service (true to enable).

Options

OptionDefaultTypeDescription
intervalnulltimeLength of time request records are kept in memory (default: 1 minute).
max60numberMaximum number of connections during interval before sending a HTTP 429.

This plugin is based on koa2-ratelimit and it has reasonable default settings, but you can still customize it in vulcan.yaml.