-
-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
featureUsed for new featuresUsed for new features
Milestone
Description
Preflight checklist
- I agree to follow this project's Code of Conduct.
- I have read and am following this repository's Contribution Guidelines."
- I have discussed this feature request with the community.
Describe the background of your feature request
If/when something goes wrong, i would like a way to limit the maximum duration of a request.
We saw recently with #2466 that when the code internally hit a deadlock, the request just hung forever. (it could also be a downstream system misbehaving.)
I would rather it failed loudly, than just hanging, and eating up system resources.
Describe your idea
Add a new configuration option for request timeout, and fail the request, if it takes longer than that.
The net/http TimeoutHandler makes this easy to implement, as shown here:
https://ieftimov.com/posts/make-resilient-golang-net-http-servers-using-timeouts-deadlines-context-cancellation/#handler-timeout
Are there any workarounds or alternatives?
Not that i know of
Version
0.16.3
Additional Context
No response
dadrus
Metadata
Metadata
Assignees
Labels
featureUsed for new featuresUsed for new features