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

haproxy: count available/unavailable backends #834

Merged
merged 1 commit into from
Feb 24, 2014

Conversation

igor47
Copy link
Contributor

@igor47 igor47 commented Feb 20, 2014

currently, the haproxy check reports a count for each distinct status; this
means that service backends in status 'up' will end up in different buckets
then backends in status up_1/3 and up_2/3 (which result from backends going
through the haproxy health check rise/fall intervals). if you have a large
rise/fall count, there might be a huge number of separate buckets.

however, often, the real concern is "how many backends can and cannot recieve
new traffic". this question is what this PR is trying to answer. we group all
backends that have up in their state into the available category, and all
of the ones that are either down, in maint, or are set to nolb in the
unavailable category. we ignore open and closed becuase those pertain to
frontends, not backends.

all available backends can recieve traffic, while all unavailable ones
cannot. this provides a great metric to monitor and alert on.

@pcarrier
Copy link

LGTM.

currently, the haproxy check reports a count for each distinct status; this
means that service backends in status 'up' will end up in different buckets
then backends in status `up_1/3` and `up_2/3` (which result from backends going
through the haproxy health check rise/fall intervals). if you have a large
rise/fall count, there might be a huge number of separate buckets.

however, often, the real concern is "how many backends can and cannot recieve
new traffic".  this question is what this PR is trying to answer. we group all
backends that have `up` in their state into the `available` category, and all
of the ones that are either `down`, in `maint`, or are set to `nolb` in the
`unavailable` category. we ignore `open` and `closed` becuase those pertain to
frontends, not backends.

all `available` backends can recieve traffic, while all `unavailable` ones
cannot. this provides a great metric to monitor and alert on.
@igor47
Copy link
Contributor Author

igor47 commented Feb 22, 2014

this is currently running in our infrastructure without any problems

@remh
Copy link
Contributor

remh commented Feb 24, 2014

Thanks @igor47 I'm merging it.
It will be part of the next release!

remh added a commit that referenced this pull request Feb 24, 2014
haproxy: count available/unavailable backends
@remh remh merged commit 1bbe353 into DataDog:master Feb 24, 2014
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

3 participants