Hi, is there a way to configure timeouts for reque...
# http4k
c
Hi, is there a way to configure timeouts for requests?
d
for outgoing you can just configure the client. for incoming it's something I've actually never seen done before TBH..
c
For incoming, we wrote our own throttling logic, and we had a pentester testing the app, and we discovered the throttling breaks because of hanging requests.
d
can you reuse something from resilience4k maybe?
c
will check
j
You might consider a proxy in front of the jvm to deal with stuff like that. Varnish and others can help mitigate slow loris type attacks.
f
I think for undertow the idle timeout is already exposed.
<http://UndertowOptions.NO|UndertowOptions.NO>_REQUEST_TIMEOUT
It can also be don for netty server if we add the ReadTimeoutHandler in the server pipeline
c
does not seem to work for undertow
the request still stays open
even after the configured time has passed
I actually found a solution using withTimeoutOrNull inside a filter that wraps the request. Bad idea @dave ?