Try
↑ ↓ move↵ openesc close

Interview prep / SLOs and alerting

Junior · SLOs and alerting · System design interview question

What SLIs would you choose for a nightly batch pipeline that builds a daily report from user events?

Sketch your own answer first, then compare it with the one below.

A strong answer

Request latency and error rate fit a user-facing API, not a job that runs once a night. Ask what the report's readers care about and measure that.

Freshness is the first: the report should be ready by, say, 06:00. As a ratio, count the days on which it was ready on time over all days in the window, or the share of the data newer than a threshold. Coverage is the second: the share of the day's events that actually made it into the report. If a source silently fails and the job finishes with 80 percent of events, a green job status hides a wrong report. Correctness is the third: a check that totals match an independent count, or that known test events appear.

Throughput and end-to-end time are useful for capacity, but they are not what readers feel, so keep them as dashboards instead of objectives.

Each indicator should be a ratio of good events to valid events, so it can be given a target such as 99 percent of mornings on time, and an error budget of about three or four late mornings in a year. "The job exited with status zero" is not an SLI, because a job can succeed at producing the wrong thing.

Sources

Learn it by running it

The slos, error budgets and alerting lesson explains the mechanism behind this question, and its lab lets you change the parameters and watch the effect.

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms