The problem
After setting the upstreams/max_requests, any extra request will get a 502 (Bad Gateway) if the current number of simultaneous requests exceeds the configured one.
This behavior is expected, since in the current implementation, both the Healthy-status and the Full-status are considered in Upstream.Available(). But sometimes this HTTP status code is confusing, since it’s hard to developers to figure out whether the backend is unhealthy or the client is out of control.
The proposed behavior
Maybe 429 (Too Many Requests) is more intuitive for this scenario?