Skip to main content
Feedback

Internal limits

The internal_limits section enables you to set more specific constraints within the main quota by defining nested internal limits that inherit from the main parent quota. Each internal limit can have its distinct filters and strategies to enforce precise control over distinct user groups or endpoints.

The following topics describe internal limit configuration scenarios:

Quota configuration scenario

The following configuration defines a parent quota (MyQuota) permitting 20,000 daily requests for https://api.website.com/. The child limits (Production, Team1, and Team2) inherit from this quota, restricting each group to 50 requests per minute:

/etc/lunar-proxy/quotas/{fileName}.yaml

quotas:
- id: MyQuota
filter:
url: api.website.com/*
strategy:
fixed_window:
max: 20000
interval: 1
interval_unit: day

internal_limits:
- id: Production
parent_id: MyQuota
strategy:
fixed_window:
max: 50
interval: 1
interval_unit: minute

- id: Team1
parent_id: MyQuota
strategy:
fixed_window:
max: 50
interval: 1
interval_unit: minute

- id: Team2
parent_id: MyQuota
strategy:
fixed_window:
max: 50
interval: 1
interval_unit: minute
On this Page