You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use this library in combination with Netty, to consume REST APIs that provide us with single fetch contracts (as for example GET /domain/resource/{id}). In other words, when we require to fetch a batch of resources by id, we create individual asynchronous HTTP calls to the respective APIs and then join the completable futures using .collect(CompletableFutures.joinList()).
When our app is under heavy load and our fetch batch logic leads to individual HTTP calls that grows dramatically, we are seeing execution times that are higher than the timeouts specified for each completable future. This is caused due to the capacity of our executor to perform each HTTP call (and queuing) but also because the current implementation of joinList and allAsList utilizes CompletableFuture#allOf, which will wait until all the stages are completed to either continue normally or exceptionally.
I coded a solution for the described matter in #68, but forgot to create an issue, so independently if my contribution gets accepted or not, maybe the improvement can still happen.
Cheers!
The text was updated successfully, but these errors were encountered:
JoseAlavez
changed the title
Provide allow to fail fast when calling joinList.
Allow to fail fast when calling joinList.
May 30, 2020
Hi spotify devs.
We use this library in combination with Netty, to consume REST APIs that provide us with single fetch contracts (as for example GET /domain/resource/{id}). In other words, when we require to fetch a batch of resources by id, we create individual asynchronous HTTP calls to the respective APIs and then join the completable futures using .collect(CompletableFutures.joinList()).
When our app is under heavy load and our fetch batch logic leads to individual HTTP calls that grows dramatically, we are seeing execution times that are higher than the timeouts specified for each completable future. This is caused due to the capacity of our executor to perform each HTTP call (and queuing) but also because the current implementation of joinList and allAsList utilizes CompletableFuture#allOf, which will wait until all the stages are completed to either continue normally or exceptionally.
I coded a solution for the described matter in #68, but forgot to create an issue, so independently if my contribution gets accepted or not, maybe the improvement can still happen.
Cheers!
The text was updated successfully, but these errors were encountered: