Replies: 1 comment
-
There are some limitations to what we can do here, mainly limited by the use of synchronous APIs and how
There is not an easy way to do that besides dropping and recreating the Ureq agent.
Ureq also performs a non-blocking read to pooled connection to check that they have not been killed. If this fails it tries a new connection immediately without an override. I think this behaviour is desired however to detect the case that the connection has been (properly) closed by the other side.
This attempt needs to be synchronous, so it will slow down some requests. We might be able to do this retry in a background thread in some cases. The issue is that this would not solve the case of the firewall closing connections and slowing down the requests after that because the first request has failed. We also need to proactively detect failed connections:
Otherwise I agree with this approach, but it would need some pretty large refactoring to implement. |
Beta Was this translation helpful? Give feedback.
-
There are a lot of issues regarding connection and retry management. So let's discuss here what would be a good scheme.
Requirements:
some ideas to solve 4:
request_timeout
of maybe only 1-2 seconds. (configurable?)penalty_timeout
(with exponential rise until a reasonable maximum)penalty_timeout
is reached) are only applied when all instances are in failing state, that's when theretries
config comes into account. that's also when less aggressiveretry_timeout
comes into account, because we are anyway in a disaster recovery.so basically we would have two global states:
penalty_timeout
is reached, but that is failing fast with the aggressiverequest_timeout
)retries * instances
times, maximum waiting time per request isretries * instances * retry_timeout
.Related issues: #178 #201 #202 #203 #204 #206 #207 #209 #210 #211
Beta Was this translation helpful? Give feedback.
All reactions