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

Get inflight requests number from endpointregistry instead of endpoint metrics #2645

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

RomanZavodskikh
Copy link
Contributor

@RomanZavodskikh RomanZavodskikh commented Oct 4, 2023

Get inflight requests number from endpointregistry instead of endpoint metrics

@RomanZavodskikh RomanZavodskikh changed the title Get inflight requests number from endpointregistry instead of endpointregistry Get inflight requests number from endpointregistry instead of endpoint metrics Oct 4, 2023
@szuecs
Copy link
Member

szuecs commented Oct 4, 2023

👍

@AlexanderYastrebov
Copy link
Member

👍

@@ -267,7 +267,7 @@ func computeLoadAverage(ctx *routing.LBContext) float64 {
sum := 1.0 // add 1 to include the request that just arrived
endpoints := ctx.Route.LBEndpoints
for _, v := range endpoints {
sum += float64(v.Metrics.GetInflightRequests())
sum += float64(ctx.Registry.GetMetrics(v.Host).InflightRequests())
Copy link
Member

Choose a reason for hiding this comment

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

💥
This loop contents for the lock inside the registry

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.

3 participants