I would say that proper internal monitoring/signal...
# ktor
o
I would say that proper internal monitoring/signaling system would be appropriate. I had something like that in my mind, but didn’t implement it yet. Basically, ktor would provide number of metrics, and user could add their own. Now, to control server load we don’t need to limit connections/requests at some specific amount, we need to ensure requests are served faster than are coming. So, if we can detect the case of accumulating unserved requests, and at some threshold start serving static “Server is busy” page (which is ultra fast), and requests stop accumulating and queue size(s) start reducing, we can start serving actual requests.