tezvyn:

Service Level Indicators: Measuring What Matters

AI-drafted, machine-checkedSource: Wikipedia: Service level indicatorintermediate

An SLI is a direct measurement of your service's performance, like request latency or error rate. It's the raw data that forms the basis for reliability goals (SLOs). The main footgun is measuring system internals instead of the actual user experience.

WHY IT EXISTS To move beyond vague complaints like "the site is slow" to objective, data-driven conversations about reliability. Without a precise measurement, you can't define what "good enough" means, know if your engineering efforts are improving things, or decide when to stop gold-plating a service.

THE MENTAL MODEL Think of an SLI as the speedometer in your car. It just shows your current speed—a raw measurement. It doesn't tell you what the speed limit is (that's the SLO, or Service Level Objective) or what the penalty for speeding is (the SLA, or Service Level Agreement). The SLI is simply the instrument providing the core data point.

HOW IT WORKS You define an SLI by choosing a critical user journey and a metric that represents a good experience. A common formula is (Good Events / Total Valid Events) * 100%. For example, for an API endpoint, "good events" might be requests that return a 2xx status code and complete in under 500ms. "Total valid events" would be all non-malformed requests. You then implement instrumentation in your application, load balancer, or via a black-box prober to collect this data.

WHEN TO USE IT Use SLIs as the foundation for any discussion about service reliability. They are essential for setting SLOs, calculating error budgets, and prioritizing work. If you need to decide whether to build a new feature or pay down technical debt, your SLI data should inform that decision. They are the first step in practicing Site Reliability Engineering (SRE).

WHEN NOT TO USE IT Do not use system-centric metrics like CPU utilization or memory usage as your primary SLIs. These are causes of problems, not symptoms felt by users. A server can have high CPU and still serve users perfectly, or low CPU while users see errors. Always measure as close to the user's experience as possible. Also, avoid having dozens of SLIs; focus on the few that represent the most critical user journeys.

ONE CANONICAL EXAMPLE A content delivery service wants to measure the availability of its image serving endpoint. They define an SLI as the percentage of GET requests to /images/* that return a 200 OK status code. Over a 28-day window, they count all such requests (Total Events) and the ones that returned a 200 (Good Events). If they served 10,000,000 images and 9,995,000 were successful, their SLI value for that period is 99.95%.

Read the original → en.wikipedia.org

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.