CSE Roadmap

Core tier · about 3 hours · 8 parts

Part 4 of 8 · 1 min read

Service level indicators

One number that says how well users are served.

Not every metric deserves an alert. UDS says it is useless to wake someone at night because memory spiked a few minutes ago. A good alert metric measures what the user gets. That is a service level indicator (SLI): a measure of one side of the service users get, such as response time, error rate or throughput. SLIs are usually computed over a rolling time window and summarised with an average or a percentile.

UDS recommends defining an SLI as a ratio of good events to total events. Then 0 means the service is broken and 1 means everything works. Ratios are easy to read and easy to alert on. Common SLIs:

SLI Good events over total events
Response time Requests faster than a threshold, over all requests
Availability Successful requests over all requests
Quality Requests served without degradation, over all requests (needs graceful degradation, Level 8)
Data completeness Records stored that can be read back later, over records stored

Service level indicator (SLI)

A service level indicator is a measure of one aspect of service quality, best written as good events divided by total events.

Example: 9,950 requests answered in under 300 ms out of 10,000 gives an SLI of 0.995.

Where to measure. For response time you could use the service, the load balancer or the client. UDS says to use the one that best represents the user's experience, and if that costs too much, the next best. The client number is more honest because it includes delays along the whole path.

Check yourself: 1. Why is a ratio a good form for an SLI? 2. In the example, how many requests missed the threshold? 3. Why measure response time at the client when possible?