-
Notifications
You must be signed in to change notification settings - Fork 351
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
phc: add metrics for number of unhealthy endpoints #3040
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -539,8 +539,10 @@ func setRequestURLForDynamicBackend(u *url.URL, stateBag map[string]interface{}) | |
func (p *Proxy) selectEndpoint(ctx *context) *routing.LBEndpoint { | ||
rt := ctx.route | ||
endpoints := rt.LBEndpoints | ||
beforefiltering := len(endpoints) | ||
endpoints = p.fadein.filterFadeIn(endpoints, rt) | ||
endpoints = p.heathlyEndpoints.filterHealthyEndpoints(ctx, endpoints, p.metrics) | ||
p.metrics.UpdateGauge("passive-health-check.endpoints.dropped", float64(beforefiltering-len(endpoints))) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After some discussions with @RomanZavodskikh, this gauge will be overwritten by different services(requests), for example svc A has 2 unhealthy endpoints and svc B has 1 both will write on the same metric. What we can do is append routeId or Name+Namespace combination. we aren't sure that's a good thing memory wise, wdyt @AlexanderYastrebov @szuecs? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From the 2 options the better is to use routeId, because Kubernetes data is 1) not available and 2) often not applicable (what about non-kubernetes dataclients?). In any case it seems that we need to add some unbounded memory usage and we should think, if we need this at all or if we start by only logs that log the endpoint. |
||
|
||
lbctx := &routing.LBContext{ | ||
Request: ctx.request, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed this one, I think it's more descriptive right now