On Thu, Feb 27, 2020 at 4:47 PM James Howe <jmh205@cam.ac.uk> wrote:
Under load, when the worker threads are saturated, new requests will be queued.
Is there a way to timeout these requests, so that it doesn't waste time serving them later when the client has already given up?

If I understand correctly, the same issue was discussed in this thread: https://lists.jboss.org/pipermail/undertow-dev/2018-July/002231.html
We ended up implementing custom logic based on CAS; here is the snippet in kotlin: https://gist.github.com/srosenberg/ed8d71d2f68379f909b1c4b8343807aa
Thus, if a request takes longer than requestTimeoutMillis to service, the exchange is ended with StatusCodes.REQUEST_TIME_OUT
The performance overhead of CAS was negligible.

Best,

stan

P.S. Sorry for the duplicate; first attempt to post was rejected by list server because I used the wrong reply address.