Add maximum value to slow down delay
hbarcelos opened this issue · 0 comments
hbarcelos commented
It would be really nice to have a way to set a maximum delay for slow down (e.g.: a maxDelayMs
config property).
If such property is set, the delay would increase as per delayMs
config up to maxDelayMs
. After reaching it, every subsequent request would be delayed exactly by maxDelayMs
.
Rationale
- Most HTTP client libraries come with a built-in
timeout
configuration that will simply drop a request after a certain period of time. - When the application is behind a reverse proxy, usually there's also a
timeout
that will force the connection dropping for such requests.
By boundlessly increasing the response delay, we could probably end up with many dangling requests, that will never see the light of day, consuming resources for nothing at all.