Open KaKi87 opened 3 weeks ago
I think this kind of feature is better implemented in a listener_wrapper
rather than an HTTP handler.
The benefit of it being an HTTP handler is it can respond with an HTTP 429.
The problem is that a listener wrapper still has to accept the connection to know the IP address, and all it can do is unkindly close the connection after that. (Unless I'm missing something. Quite possible. Running on like 4 hours of sleep today.)
The benefit of it being an HTTP handler is it can respond with an HTTP 429.
Good point
Would the alternative be letting the request time out ?
Hi,
It would be nice to be able to limit the number of requests that a client can make not just in a time range, but concurrently.
For example, if a client has reached a maximum number of allowed simultaneous requests, then another one will be rejected with 429 until at least another one finishes, after which they can try again.
Thanks