fasthttp
fasthttp copied to clipboard
How to monitor requests dropped by fasthttp.Server{Concurrency}?
Hello!
We want to monitor requests that are dropped by the http.Server{Concurrency} setting and to count the number of rejected requests and write it to prometheus.
Could you make a handler so that something can be done when the request is rejected by ConcurrentLimit here https://github.com/valyala/fasthttp/blob/master/server.go#L1834 ?
I don't have time to add this but a pull request is always welcome!
I don't have time to add this but a pull request is always welcome!
ok, thanks. I'll make a pull request with revision. You also have GetOpenConnectionsCount and GetCurrentConcurrency methods for monitoring, maybe even better add a rejected request method like GetRejectedRequestCount?
Sounds like a good idea.