Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

[skip ci] [wip] optional ewma monitoring using statsd #223

Open
wants to merge 1 commit into
base: ewma-improvements-1
Choose a base branch
from

Conversation

ElvinEfendi
Copy link

What this PR does / why we need it:

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

for _, endpoint in ipairs(self.peers) do
local endpoint_string = endpoint.address .. ":" .. endpoint.port
local ewma = get_or_update_ewma(endpoint_string, 0, false)
statsd.gauge(STATSD_BALANCER_EWMA_VALUE, ewma, { endpoint_string = endpoint_string, backend_name = backend_name })
Copy link
Author

Choose a reason for hiding this comment

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

Cardinality will be an issue here since we are tagging by upstream identifier which constantly changes.

I wonder if we should just use logging for this - we can attach EWMA score of picked upstream to every request log. That way we can see how EWMA score of a particular upstream changes over time. The shortcoming of this is that we have to have requests to get the scores - but I think this is acceptable.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant