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

Latency tracking utilities to support LB L7 breakers #2794

Merged
merged 7 commits into from
Jan 10, 2024

Conversation

tkountis
Copy link
Contributor

@tkountis tkountis commented Jan 8, 2024

Motivation

Support latency tracking APIs and default EWMA based decay-able solutions to allow implementation of richer L7 circuit breakers for the load balancers.

Modification

Introduced the LatencyTracker API along with a default implementation.

@tkountis tkountis self-assigned this Jan 8, 2024
Copy link
Contributor

@bryce-anderson bryce-anderson left a comment

Choose a reason for hiding this comment

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

Other than the one grammar error I don't mind waiting to address any more feedback in follow ups since none of this is being exposed yet.

if (halfLifeNanos <= 0) {
throw new IllegalArgumentException("halfLifeNanos: " + halfLifeNanos + " (expected >0)");
}
tau = halfLifeNanos / log(2);
Copy link
Contributor

Choose a reason for hiding this comment

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

ffti: probably not worth the noise but if you store inv_tau we can use multiplcation later on instead of the slower division.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is Math.pow((halfLifeNanos / log(2)), -1) what you had in mind?

tkountis and others added 2 commits January 8, 2024 09:56
…ncer/DefaultLatencyTracker.java

Co-authored-by: Bryce Anderson <bryce_anderson@apple.com>
…ncer/LatencyTracker.java

Co-authored-by: Bryce Anderson <bryce_anderson@apple.com>
@tkountis tkountis merged commit 8a8e3ab into apple:main Jan 10, 2024
15 checks passed
@tkountis tkountis deleted the lb-latency-tracker branch January 10, 2024 00:06
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.

2 participants