{"canonical_url":"https://engineer.company/glossary/service-level-objective/","content_markdown":"# Service level objective\n\n## What it is\n\nA service level objective is a target for how well a service behaves, written\nso precisely that anyone can check whether it was met: a share of requests that\nmust succeed, or must be answered fast enough, over a stated period. Almost\neveryone shortens it to SLO. Google's Site Reliability Engineering book defines\nit as a target value, or a range of values, for one level of service, as\nmeasured by an indicator.\n\nThat indicator is the service level indicator, or SLI: a quantity defined with\ncare to describe one aspect of the service users actually get. Request latency\nis the usual first choice, with error rate and throughput close behind. The SRE\nWorkbook recommends writing every SLI as a ratio, good events divided by all\nevents, so that it runs from 0%, where nothing works, to 100%, where nothing is\nbroken. The objective is then a line drawn on that scale: the indicator must\nstay on the right side of a target, or between a lower and an upper bound.\n\nA complete objective names everything needed to check it. The book's example\nreads: 99% of Get RPC calls, averaged over one minute, complete in under 100 ms,\nmeasured across all backend servers. One indicator can carry several targets at\nonce, such as 90% of calls under 1 ms, 99% under 10 ms and 99.9% under 100 ms,\nbecause one percentile rarely describes a whole distribution. The Workbook also\nseparates the specification, the outcome that matters to users, from the\nimplementation, the place it is measured: a server log, a prober running a\nbrowser, or code in the page itself. Each one sees different failures, and the\nchoice belongs in the definition.\n\nAn SLO is not an SLA. A service level agreement is a contract with users,\nexplicit or implicit, that attaches consequences to meeting or missing the\nobjectives inside it, most visibly a rebate or a penalty. The book's test is to\nask what happens when the objective is missed: if nothing explicit follows, it\nis an SLO. A footnote adds that people who talk about a violated SLA nearly\nalways mean a missed SLO, since a real breach of an SLA can end in court for\nbreach of contract. Google Search, the book notes, has no SLA for the public,\nbut an outage of it still costs reputation and advertising revenue.\n\n## Why it matters\n\nWithout a stated objective, users invent their own. The SRE book describes both\nways that goes wrong: people who trust a service more than they should, and\nprospective users who think it flakier than it is and stay away. Its example is\nChubby, Google's lock service for distributed systems. Global outages of it\nwere so rare that other services quietly came to depend on it never failing,\nand those services broke on the rare occasions it did. The answer was to make\nthe global instance meet its SLO without exceeding it by much: in any quarter\nwhere real failures had not pushed availability below the target, SRE took the\nsystem down on purpose.\n\nThe objective also settles the argument about how reliable is reliable enough.\n\"100% reliability is the wrong target\", writes the SRE Workbook, and its reasons\nare practical. Components fail at the same time however they are built. The\nchain of networks and devices between a service and its customers fails too,\nso the customers would never see the 100%. Each extra nine costs more than the\nlast while its value to users approaches zero. And since change is the leading\ncause of outages, a service that may never fail can never be updated either.\nOnce the target is below 100%, the gap between the target and perfection is\nroom to spend on releases, experiments and planned maintenance: the error\nbudget, which is simply 100% minus the SLO. Someone has to own that trade\nbetween shipping features and staying up; the Workbook names the CTO in a small\norganisation and the product owner or product manager in a larger one.\n\nFinally, the objective turns monitoring into decisions. The book describes a\nloop: measure the indicators, compare them with the objectives, decide whether\nanything needs doing, and do it. If latency is climbing and will cross the line\nwithin a few hours, the team checks whether the servers are CPU-bound and adds\nmore of them. Without the objective, the book points out, nobody can say\nwhether to act, or when.\n\n## What it looks like in practice\n\nTake a checkout API and an objective written the way the Workbook suggests,\nwith the indicator separate from where it is measured, the window stated and\nthe reasoning kept beside it:\n\n```text\nService:    checkout API\nSLI:        share of POST /checkout requests answered without a 5xx\n            status, counted in the server's request log\nObjective:  99.9% over a rolling 28-day window\nRationale:  observational, rounded down from four weeks of data\nOwner:      product manager, with the on-call engineers\nReview:     monthly until it settles, then quarterly\n```\n\nThe window matters as much as the percentage. The Workbook prefers a rolling\nwindow to a calendar month, because users do not forget an outage on the last\nday of a month when the next one begins, and a whole number of weeks, so that\nevery window holds the same number of weekends; four weeks is its\ngeneral-purpose choice. That window is 28 × 24 × 60 = 40,320 minutes, and 0.1%\nof it is a little over 40 minutes of complete outage. On a 30-day month the same\n99.9% allows 43.2 minutes, the figure in the book's availability table.\n\nTime is the cruder way to count, though. The SRE book explains that Google\nmeasures availability as the success rate of requests rather than as uptime,\nbecause a service spread across the world is seldom entirely up or entirely\ndown. Counted in requests, the Workbook's example runs: at 99.9%, 3 million\nrequests over four weeks leave room for 3,000 failures, and an outage that\ncauses 1,500 of them uses half the budget. Counting requests also prices the\npartial failures that uptime misses. At steady traffic, 20 minutes in which\nhalf of all requests fail costs as much as 10 minutes of total outage, which is\nroughly a quarter of the 28-day budget.\n\nIn Prometheus, with a request counter labelled by status, the indicator over the\nwindow is one ratio, modelled on the Workbook's own example:\n\n```promql\nsum(rate(http_requests_total{job=\"checkout\", status!~\"5..\"}[28d]))\n  /\nsum(rate(http_requests_total{job=\"checkout\"}[28d]))\n```\n\nOn this site, the [service levels](/service-levels/) page sits on the agreement\nside of the line. For a system the company runs on a client's behalf, the\nresponse time for an incident, the hours covered, the availability it is held to\nand the maintenance windows are written into the agreement for that system, and\nthey are set per system because a nightly report and a payment service need\ndifferent answers. The [first-party error monitoring and\ntracing](/portfolio/built-first-party-error-monitoring-and-tracing/) built by\nthe founder as part of current work under NextMariner surfaces through a set of\noperator views, one of them for service level objectives. And the note on\n[selling the last ticket exactly\nonce](/notes/selling-limited-stock-without-overselling/) turns a stock invariant\ninto one: check it on a schedule, chart it and page on any drift, so that zero\noversells is an objective with an alert behind it rather than a hope.\n\n## Where it goes wrong\n\n**The target is copied from last month's dashboard.** Taking whatever the\nsystem achieves today feels safe, but the SRE book warns that a target adopted\nwithout reflection can lock a team into heroic efforts to keep meeting it, on a\nsystem that cannot improve without a redesign. Work back from what users need,\nand write the reasoning down beside the number: the Workbook asks for the\nrationale, and for whether the figures came from experiment or observation,\neven when they are frankly ad hoc. Review the document monthly at first and\nquarterly once it settles.\n\n**The objective is 100%, or a string of nines nobody has priced.** A system\nthat is always available, or scales without limit, is expensive to build and\nrun, and better than users would notice. Start with a loose target and tighten\nit as you learn the system; the book prefers that to a strict target that later\nhas to be relaxed because it proved out of reach.\n\n**An average stands in for what users feel.** In the book's example a typical\nrequest takes about 50 ms while 5% of requests take twenty times as long, and a\ngraph of the average shows nothing happening all day. Write latency objectives\nas percentiles, or as a share of requests under a threshold such as 300 ms,\nnever as a mean.\n\n**There are more objectives than anyone can defend.** A dozen SLOs per service\ndilutes all of them. The book's test is blunt: if quoting an objective can never\nwin an argument about priorities, it is probably not worth having. Keep the few\nthat cover what users actually do.\n\n**Missing the objective changes nothing.** The Workbook calls this an SLO\nwithout teeth: compliance becomes one more KPI on a report instead of a reason\nto decide anything. Agree in advance what happens when the budget is spent, and\nhave the product manager, the developers and the SREs sign it. The Workbook's\nexample error budget policy pauses ordinary changes while the service is outside\nits objective, allowing only the highest-priority bug fixes and security work,\nand says in so many words that the policy is not a punishment.\n\n**The SLO is the same number as the SLA.** When the internal objective matches\nthe contract, the first a team hears of trouble is the breach. The book\nrecommends a tighter internal objective than the one advertised, as a buffer\nfor chronic problems. The opposite mistake matters too: a service that runs far\nbetter than its objective teaches users to depend on that, so the book suggests\noccasional planned downtime, throttling, or a system that is no faster under\nlight load.\n\n**The window is longer than the data.** A 28-day objective computed on a\nPrometheus server that keeps 15 days of samples, the default when no retention\nis set, quietly measures 15 days and reports it as four weeks. Set the\nretention past the window before trusting the number:\n\n```text\nprometheus --storage.tsdb.retention.time=35d\n```\n\n## Further reading\n\n- [Service Level Objectives](https://sre.google/sre-book/service-level-objectives/)\n  — chapter 4 of Google's Site Reliability Engineering book: indicators,\n  objectives and agreements, and how to choose a target.\n- [Implementing SLOs](https://sre.google/workbook/implementing-slos/) — the SRE\n  Workbook's chapter on SLIs as ratios, error budgets, windows and writing the\n  objective down.\n- [Example Error Budget Policy](https://sre.google/workbook/error-budget-policy/)\n  — a complete policy for a fictional game service: when releases stop, and who\n  settles a disagreement.\n- [Embracing Risk](https://sre.google/sre-book/embracing-risk/) — why Google\n  measures availability by request success rather than uptime, and what each\n  step of reliability costs.\n- [Availability Table](https://sre.google/sre-book/availability-table/) — how\n  much downtime each level of availability allows per year, quarter, month,\n  week, day and hour.\n- [Storage](https://prometheus.io/docs/prometheus/latest/storage/) — how\n  Prometheus keeps samples on disk, and the retention flags that decide how far\n  back an SLO query can see.\n\n\u003chttps://engineer.company/glossary/service-level-objective/\u003e\n","date_modified":"2026-11-09T21:50:25Z","description":"What a service level objective measures, how it differs from an SLA, what a 99.9% target leaves to spend, and how the wrong number does harm.","formats":{"gemtext":"https://engineer.company/glossary/service-level-objective/index.gmi","gopher":"https://engineer.company/glossary/service-level-objective/gophermap","html":"https://engineer.company/glossary/service-level-objective/","json":"https://engineer.company/glossary/service-level-objective/index.json","markdown":"https://engineer.company/glossary/service-level-objective/index.md","pdf":"https://engineer.company/glossary/service-level-objective/index.pdf"},"kind":"page","language":"en","title":"What is a service level objective?","url":"https://engineer.company/glossary/service-level-objective/","version":1}