In a previous post I covered what an SLO is: What is an SLO?
To provide a brief summary, an SLO is a Service Level Objective, or rather a target that we aim for when providing a service to customers. It allows us to draw a line in the sand in regards to how well we are operating.
Once we know where we want to aim with our SLO, we have to dive deeper into knowing if we are getting there. While the SLO defines what our objective is, we need a measuring stick to truly know if we are meeting that objective or not. Insert the SLI.
An SLI, or Service Level Indicator, is that measuring stick. But how does it actually work? I think the best way to understand the relationship between an SLO and an SLI is with an example.
Let’s say we’re at a carnival and we happen to stroll by a few games. One of the games is a basketball game. Make as many baskets as you can in 1 minute. Well there’s your objective right there, make baskets.
But it’s not quite an SLO yet. To be an SLO, we need to have a target, so let’s be really aggressive in this example and say that we want to make 99% of our shots. Two 9’s of bucketability.
Now that we have our SLO (99% of buckets made) we need an SLI… Something to measure how well we are doing. We could of course count the number of shots made by hand but let’s say we’re a single carnival vendor running 3 or 4 booths. Go even bigger, let’s say we’re a multi-million dollar company trying to put an SLO on system Response Times. You gonna count those by hand?
So let’s automate this and have our basketball game install a little flipper inside the basket so every time a shot goes in, the flipper gets pressed down, and the score on the game goes up by one. That little flipper is our SLI. It is our tool for measuring how well we are doing. How close we are to being at two 9’s of bucketability.
Now let’s bring in a player. Our player comes in and starts shooting. They play quite a few games and they end up making 194 out of 200 shots (ballin‘) which translates into a 97% shot rate. Since our SLO is 99% of buckets made, this would fall below our SLO.
Our SLI, or indicator, should then properly alert and/or notify us that we are not meeting our objective and that we may need to make changes. So let’s send our player out to training for a few days. Let’s improve the system that makes buckets per se.
Once our player returns, we line them back up, and have them start shooting again. This time around they make 198 out of 200 shots nailing the 99% SLO!
We’ve just used our SLI to track how many shots were made and then to notify us when we were below our SLO. We used our SLO to recognize we need to provide more training for our player and after doing so, we’re able to re-utilize our SLI to confirm the improvement. Buckets!
While this example was very simple, in a world of technology where counting goes from 200 buckets to 2 million web requests over an hour, having an automated SLI becomes critical to properly measuring where your system is at in regards to the service it is providing to your customers.
The only thing worse than not providing great service with your products is not knowing the service you’re providing at all.