Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loadbalancer-experimental: allow configuring whether cancellation is an error #2956

Merged

Conversation

bryce-anderson
Copy link
Contributor

Motivation:

Cancellation is ambiguous as to why it was cancelled, although it is most likely due to timeouts. We should let users configure this.

Modifications:

  • Make classification of cancellation as an error a configuration option.
  • Thread it through, including in the providers.

Result:

More flexible classification of cancellation.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
bryce-anderson Bryce Anderson
…an error

Motivation:

Cancellation is ambiguous as to why it was cancelled, although
it is most likely due to timeouts. We should let users configure
this.

Modifications:

- Make classification of cancellation as an error a configuration
  option.
- Thread it through, including in the providers.

Result:

More flexible classification of cancellation.
@@ -317,6 +327,7 @@ public static final class Builder {
static final Duration DEFAULT_EWMA_HALF_LIFE = Duration.ofSeconds(10);
static final long DEFAULT_CANCEL_PENALTY = 5L;
static final long DEFAULT_ERROR_PENALTY = 10L;
private boolean cancellationIsError;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's worth considering cancellation to be errors as the default since timeouts will be a very common reason for cancellation. Opinions welcome.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did end up changing the default because we already consider cancellation as a half-penalty for the P2C algorithm. Opinions appreciated.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
bryce-anderson Bryce Anderson
@bryce-anderson bryce-anderson merged commit bb569d0 into apple:main Jun 7, 2024
11 checks passed
@bryce-anderson bryce-anderson deleted the bl_anderson/configure-cancellation branch June 7, 2024 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants