Concurrent strategy
The Concurrent strategy limits simultaneous requests rather than tracking request volume across a time window. This approach helps to manage concurrent traffic across Gateway policies and endpoints, reducing server strain during high-traffic periods.
This strategy defines a maximum allowed concurrent requests limit (max_request_count). If the limit is reached, additional requests are blocked until active requests finish, freeing up capacity for new requests. It also supports optional headers for reporting remaining limits.
The following configuration example defines a concurrent quota limit:
/etc/lunar-proxy/quotas/{fileName}.yaml
quotas:
- id: ConcurrentQuota # Unique identifier for the quota
filter: # Define filter conditions for this quota
url: api.website.com/* # URL pattern to apply the quota
strategy:
concurrent:
max_request_count: 50 # Maximum concurrent requests allowed