armeria: HealthCheckedEndpointGroup should probably wait for connectTimeout before throwing exception.
Currently, HttpHealthCheckedEndpointGroup will throw an EndpointGroupException immediately when a request is attempted when there are no endpoints. It would be more intuitive and simpler to use if it was possible for the request to wait until ClientFactory.connectTImeout() before throwing the exception, allowing a health checked endpoint group to have similar connection behavior as just a single endpoint.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 18 (1 by maintainers)
Commits related to this issue
- Allow retrying when an `EndpointGroup` is empty. Related: #1910 Motivation: A client request to an empty `EndpointGroup` fails immediately with an `EmptyEndpointGroupException`, even if there is a ... — committed to trustin/armeria by trustin 4 years ago
- Allow retrying when an `EndpointGroup` is empty. (#2736) Related: #1910 Motivation: A client request to an empty `EndpointGroup` fails immediately with an `EmptyEndpointGroupException`, even i... — committed to line/armeria by trustin 4 years ago
- Asynchronous endpoint selection Motivation: Currently, sending a request will fail immediately with an `EmptyEndpointGroupException` when the target `EndpointGroup` is empty without waiting at all. ... — committed to trustin/armeria by trustin 4 years ago
- Asynchronous endpoint selection Motivation: Currently, sending a request will fail immediately with an `EmptyEndpointGroupException` when the target `EndpointGroup` is empty without waiting at all. ... — committed to trustin/armeria by trustin 4 years ago
- Asynchronous endpoint selection (#2837) Motivation: Currently, sending a request will fail immediately with an `EmptyEndpointGroupException` when the target `EndpointGroup` is empty without wait... — committed to line/armeria by trustin 4 years ago
- Allow retrying when an `EndpointGroup` is empty. (#2736) Related: #1910 Motivation: A client request to an empty `EndpointGroup` fails immediately with an `EmptyEndpointGroupException`, even i... — committed to fmguerreiro/armeria by trustin 4 years ago
- Asynchronous endpoint selection (#2837) Motivation: Currently, sending a request will fail immediately with an `EmptyEndpointGroupException` when the target `EndpointGroup` is empty without wait... — committed to fmguerreiro/armeria by trustin 4 years ago
There are two things to fix for this issue:
Endpointfrom anEndpointGroup, we need to wait up to certain amount of time (connect timeout) before raising anEmptyEndpointGroupException.EndpointGroup.select()that requires a timeout value and returns aCompletableFuture<Endpoint>. The new method could be used when a) initializing a new context and b)RetryingClientchooses a new endpoint.EmptyEndpointGroupException, a request will always fail with a response whose failure cause is aUnprocessedRequestException, regardless of whetherRetryingClientis present in a decorator chain or not. This behavior needs to change so that the successful re-attempts made byRetryingClientare passed to the caller.Not sure this will be as easy as I described above (devils are always in details 😱). Any better ideas or traps I didn’t realize yet?
I’d like to target this issue for 1.0 again given its impact.