gateway: limit the number of requests in flight #881
Labels
kind/enhancement
A net-new feature or improvement to an existing feature
P2
Medium: Good to have, but can wait until someone steps up
topic/gateway
Issues related to HTTP Gateway
Currently, we have no "requests in flight" cap in
boxo/gateway
and require reverse proxy in front of go binary to enforce the limit.Proposed improvement
There should be a built-in mechanism to limit the number of ongoing HTTP gateway requests in flight, and return HTTP 503 Service Unavailable with Retry-After when limit is reached.
Make it a config option,
boxo/gateway
should ship with some implicit default, protecting people who expose it blindly to the internetPrior art
worker_connections
is set to10240
(per each instance). For reference, nginx default is 512, raising to 1024 seems to be a sensible place to start as default, protecting from traffic spikes.proxy_read_timeout
) – we dont have built-in config yet, but its tracked in gateway: ability to set response write timeout #679The text was updated successfully, but these errors were encountered: