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

Only 0.0 - 1.0 objectives? #24

Open
mccartney opened this issue Jun 7, 2021 · 3 comments
Open

Only 0.0 - 1.0 objectives? #24

mccartney opened this issue Jun 7, 2021 · 3 comments
Labels
schema Shape of YAMLs

Comments

@mccartney
Copy link

target: numeric [0.0, 1.0) # budget target for given objective of the SLO

timeSliceTarget: numeric (0.0, 1.0] # required only when budgetingMethod is set to TimeSlices

This assumes the values will be only between 0% and 100% which seems to match the typical availability service level indicators. And generally a good practice. Although I saw other kind of SLIs in real-life.

Relevant SRE book chapter:
https://sre.google/workbook/implementing-slos/
which generally advocates for defining the 0%-100% ones. And even introduce the notions of "SLI specification" and "SLI implementations" with only the latter ones matching 0%-100%.

TLDR: I suggest to open up for other kind of SLIs, not only the [0,1] ones.

@its02003
Copy link

Can you give an example of an objective target where the availability would be something outside of 0-100%?

@mccartney
Copy link
Author

Can you give an example of an objective target where the availability would be something outside of 0-100%?

Not for availability. I have only ever saw availability being 0-100%.

But I thought this definition of timeSliceTarget is not only for availability SLIs, but other SLIs too. If so, examples of SLIs which are not 0-100% are:

  • p95 of HTTP request processing time per second
  • number of failed customer transactions per minute

@Maixy
Copy link

Maixy commented Jul 22, 2022

p95 of HTTP request processing time per second

This should still be a 0-100% target. With TimeSliceTarget you'd be counting up the number of intervals per rolling window where the p95 was < your target divided by the total number of intervals per window.
ex. Minutes where request processing time p95 < 500ms in the last 28d / minutes in the last 28d
This results in a percentage between 0 and 100

number of failed customer transactions per minute

This should presumably include a threshold that's acceptable, ex. 10 failed transactions per minute is 🆗 but beyond that isn't acceptable.
With that threshold, each minute gets evaluated separately, and we get the similar equation to the above example:
Minutes in the last 28d where the number of failed transactions were less than 10 / total minutes in the last 28d

@programmer04 programmer04 added the schema Shape of YAMLs label Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
schema Shape of YAMLs
Projects
None yet
Development

No branches or pull requests

4 participants