Site Reliability Engineering Principles Questions
The core SRE practice model: service-level objectives and indicators, error budgets, toil reduction, and reliability as an engineering discipline. Covers the principles and trade-offs behind treating operations as a software problem and balancing reliability against feature velocity. The conceptual foundation questions specific to SRE-style roles.
A security team proposes a stricter authentication flow that increases latency and introduces some additional error rate. As SRE, propose how you would balance the security requirement against the reliability goal: what you would measure, negotiate, or mitigate.
Sample Answer
Balancing a security change that hurts reliability starts from the premise that this is not security versus reliability as opposing goals, it's finding the specific implementation of the security requirement that satisfies the actual threat model at the lowest reliability cost, since most security requirements have more than one way to be satisfied. The approach is to measure the actual reliability impact rather than estimate it, negotiate the requirement's specifics (not just accept or reject it wholesale), and mitigate the remaining cost with standard reliability techniques rather than treating it as unavoidable.
Working through the trade-off
- Measure, don't estimate, the actual impact. Before arguing about the change, load-test or canary it to get real numbers: how much latency does the added authentication step actually add, and what's the real error-rate increase, rather than debating a hypothetical.
- Understand what's actually required versus how it's currently proposed. A "stricter authentication flow" might be satisfiable with a cached, shorter-lived token validated locally most of the time and only re-validated against the identity provider periodically, instead of a synchronous round-trip on every single request; the security requirement and its most expensive possible implementation are not the same thing.
- Apply standard mitigations to the remaining cost. If some latency and error-rate increase is unavoidable, standard reliability techniques reduce its blast radius: caching validated tokens for their safe lifetime, adding a circuit breaker around the identity-provider dependency so its failure degrades gracefully rather than cascading, and rolling the change out as a canary to catch a worse-than-expected impact before it's fully live.
- Make the residual trade-off an explicit, owned decision, not an implicit one. If after mitigation there's still a real reliability cost, that's a decision for whoever owns both the security and the reliability target to make consciously, informed by real numbers, not something engineering absorbs silently.
Worked example
A security team proposes moving from long-lived session tokens to short-lived tokens re-validated against the identity provider on every request. A canary of the new flow on 5% of traffic shows p99 (99th-percentile) latency increasing by 45 milliseconds and error rate increasing by 0.3 percentage points, both driven by the identity provider's own latency and occasional timeouts under load. The negotiated alternative: cache validated tokens for 60 seconds (short enough to meet the security team's freshness requirement, since 60 seconds is well within their stated threat window) instead of re-validating on every request, plus a circuit breaker around the identity-provider call so a slow or failing identity provider degrades to the cached validation rather than failing every request. The re-canaried result: p99 latency increase drops to roughly 4 milliseconds and the error-rate increase becomes negligible, while still meeting the security team's actual requirement rather than their initial specific implementation of it.
Trade-offs and pitfalls
Accepting a security requirement's first proposed implementation without probing what it's actually protecting against risks paying a much larger reliability cost than necessary; conversely, resisting a legitimate security requirement purely on reliability grounds, without proposing a workable alternative, isn't a real answer either and tends to get overridden anyway once a real incident makes the security gap concrete. The right posture treats both reliability and security as real constraints with real owners, and looks for the specific implementation that satisfies both, rather than treating the trade-off as a fixed, zero-sum choice between the two.
Write a Python function (or clear pseudocode) that computes an availability SLI (successful_requests / total_requests) from streaming logs where some minutes are missing due to ingestion delays. Describe assumptions you make about late-arriving data and how you'd report the SLI conservatively for alerting.
Sample Answer
Reporting an SLI conservatively when data is missing means treating a gap as though it were bad, not silently excluding it, so an ingestion outage can never make the reported number look better than reality.
Structured elaboration
Rather than skipping minutes with no data (which would compute an SLI only over the minutes you happen to have, an implicit and dangerous form of survivorship bias if the missing minutes correlate with an actual outage), each missing or empty minute contributes ZERO success toward the average, dragging the reported SLI down exactly as far as a fully-bad minute would; the final SLI is the mean of each minute's own success ratio (or zero, if missing) across the full stated window.
Worked example (executed; python3, verified against 3 cases)
from typing import List, Tuple, Optional
def compute_availability_sli(minute_counts: List[Tuple[Optional[int], Optional[int]]]) -> float:
total_minutes = len(minute_counts)
good_equivalent = 0.0
for succ, tot in minute_counts:
if succ is None or tot is None or tot == 0:
good_equivalent += 0.0
else:
good_equivalent += succ / tot
return good_equivalent / total_minutes if total_minutes else 0.0
Confirmed: 3 perfect minutes (100/100 each) plus 1 missing minute returns 0.75 (the missing minute is dragged to 0, not excluded, so it isn't averaged away as if it never happened); 10 minutes of steady 95/100 with no gaps returns exactly 0.95; a window that is entirely missing data correctly returns 0.0 rather than an undefined or misleadingly-high value.
Trade-offs and pitfalls
This conservative convention is deliberately the OPPOSITE of a retrospective compliance calculation that might reasonably EXCLUDE missing minutes from the denominator (since for reporting purposes you may not want a monitoring gap to count against a team that had a healthy service the ingestion pipeline simply failed to observe); which convention is correct depends on whether the number feeds a real-time ALERT (where you want to fail safe and assume the worst) or a retrospective SLA REPORT (where excluding a known monitoring gap, clearly documented as such, may be fairer). Silently picking one convention without stating it is the actual defect to avoid; whichever is chosen, document it next to the number.
Your SLA requires 99.9% freshness for derived metrics used on dashboards. Define 4 SLIs and an SLO you would recommend for services that compute these metrics and describe how you'd measure and report them.
Sample Answer
A 99.9% freshness SLA on derived dashboard metrics needs to be decomposed into SLIs that each capture a different stage where freshness could be lost, since a single blended "is it fresh" number hides WHERE in the pipeline a delay is actually occurring.
Structured elaboration
Four SLIs: (1) source-to-ingestion lag - time from the source event occurring to it landing in the raw ingestion layer; (2) ingestion-to-transform lag - time from raw ingestion to the derived-metric computation completing; (3) end-to-end freshness - the combined total, source event to dashboard-visible metric, which is the number that actually maps to the 99.9% SLA commitment; (4) computation success rate - proportion of scheduled metric-computation runs that complete successfully at all, since a freshness number computed only from SUCCESSFUL runs silently ignores runs that failed entirely, which is itself a freshness (and correctness) problem.
Worked example
SLO: 99.9% of end-to-end freshness measurements land under a defined threshold (e.g. under 10 minutes) over a 30-day rolling window, with the three component SLIs (source-to-ingestion, ingestion-to-transform, computation success rate) tracked as diagnostic breakdowns rather than separately-committed SLAs. If the end-to-end SLI degrades, the three component SLIs let you immediately localize whether the delay is happening at ingestion (a source-system problem) or at transform (a compute-pipeline problem), without which you'd only know "it's slow" with no actionable next step.
Trade-offs and pitfalls
Reporting only the end-to-end number without the component breakdown is fine for the customer-facing SLA report but nearly useless for diagnosing an actual regression internally; both views need to exist, aimed at different audiences. It's also worth being careful about how the computation-success-rate SLI interacts with the freshness SLI: a completely FAILED computation run has no freshness reading at all (there's no metric to measure the lag of), so it must be explicitly counted against the SLO as a worst-case freshness violation, not silently excluded from the freshness average simply because it produced no valid data point to measure.
You inherited a service with no SLOs and minimal monitoring. The product manager wants measurable reliability improvements in 30 days. Create a plan to define appropriate SLOs, implement minimum viable monitoring and alerting, and deliver concrete reliability improvements within 30 days. Include which metrics, tooling choices, and quick-win actions you'll prioritize.
Sample Answer
Thirty days is enough time to get real minimum-viable monitoring in place and land a few concrete fixes, but not enough to justify an aggressive SLO target; the plan needs to be honest about that distinction from day one.
Structured elaboration
Week 1: instrument the golden signals (latency, traffic, error rate, saturation) even before any target exists, using whatever the org already has available rather than introducing new tooling under time pressure, e.g. Prometheus + Grafana (or a hosted equivalent like Datadog or a cloud provider's native metrics, such as CloudWatch) for metric collection and dashboards, and the existing on-call/paging tool (e.g. PagerDuty or Opsgenie) for alert routing, since standing up brand-new tooling in week 1 of a 30-day window competes directly with the time needed to actually instrument and observe. Set up basic alerting on obvious failure conditions (5xx spike, service down) that don't require historical baselining to be useful. Week 2: with a few days of real data, propose a deliberately conservative INITIAL SLO (looser than hoped-for, since there's no real baseline yet) and identify 1-2 quick-win reliability fixes visible from the new telemetry (an obvious N+1 query, a missing timeout, an unbounded retry loop). Weeks 3-4: implement the quick wins, tighten alerting thresholds based on the now-larger dataset, and present a plan for the NEXT phase (a real SLO, set with proper headroom) rather than pretending 30 days is enough to also validate a long-term target. The same underlying discipline applies whether the deadline is a relatively relaxed 30 days or a much tighter two-week window with no maintenance window available at all: the sequence (instrument first, then quick wins, then a real target) just compresses, with even more conservatism applied to any interim SLO or error-budget accounting during that short bootstrap period, since there isn't enough data yet to trust a tight number.
Worked example
For a service with no prior monitoring: Day 1-3, deploy request-count, error-rate, and p95-latency instrumentation using the org's existing Prometheus/Grafana stack (or the closest equivalent already running elsewhere in the company), wired into the existing PagerDuty rotation rather than a new one. Day 4-10, observe; find that 15% of requests hit an endpoint making an unindexed database query under load, an easy, well-understood fix. Day 11-20, ship the fix, observe improvement (p95 latency drops from 900ms to 200ms). Day 21-30, propose an initial SLO (e.g. 99% success / p95 < 400ms, comfortably above what's now being observed) as a placeholder, explicitly flagged to stakeholders as provisional pending a longer observation window.
Trade-offs and pitfalls
The biggest risk under a hard 30-day (or shorter) deadline is a product manager interpreting "we set an SLO" as "the reliability problem is solved," when in reality only the FIRST cheap fixes have landed and the number itself is still a conservative placeholder; that expectation needs managing explicitly and early, not left implicit. It's also tempting to skip instrumentation and jump straight to "fixes" under deadline pressure, but without baseline telemetry there's no way to demonstrate the fixes actually helped, which undermines the whole exercise's credibility with the very stakeholder who's watching for measurable improvement. Introducing an entirely new observability stack from scratch inside a 30-day window is itself a common mistake: reusing whatever tooling the org already trusts and knows how to operate is almost always faster than evaluating and onboarding a new platform under deadline pressure.
Compare a centralized SRE team model against an embedded model, where SRE engineers sit inside product teams. For a large organization with many product groups, propose a hybrid that balances centralized standards against team autonomy, and describe how that structure would need to evolve as the organization scales from a small team to hundreds of engineers.
Sample Answer
A centralized SRE model pools reliability engineers into one team that serves many product groups, which maximizes consistency and lets scarce reliability expertise scale across the company; an embedded model places SRE engineers inside each product team, which maximizes context and speed of iteration but risks each team reinventing its own standards and tooling. For a large, many-product organization, a hybrid usually wins: a small central platform team owns the shared reliability substrate (tooling, SLO framework, incident process, training) while embedded or team-aligned SREs apply it to their specific product's context, reporting a dotted line back to the central team for standards and career growth.
Comparing the two pure models
| Dimension | Centralized | Embedded |
|---|---|---|
| Consistency of practice | High: one SLO framework, one incident process, one tool stack | Low by default: each team can drift toward its own conventions |
| Product context and speed | Lower: central SREs are generalists across many services | High: embedded SREs know the service and its team deeply |
| Scaling reliability expertise | Efficient: a small team's standards reach every product | Expensive: expertise must be re-hired or re-trained per team |
| Autonomy and trust | Lower: product teams feel reliability is imposed on them | Higher: reliability decisions are made by people who ship the code |
| Failure mode at scale | Becomes a bottleneck and a queue that product teams route around | Becomes fragmented; incidents that cross services have no shared playbook |
Designing the hybrid
- Central platform layer: owns the service-level objective (SLO) framework and tooling, the incident-command process, the production-readiness bar, and a small set of non-negotiable standards (what "on-call ready" means).
- Team-aligned reliability engineers: embedded in or paired with each product group, applying the shared framework to that team's actual service, running that team's on-call rotation, and feeding real-world friction back to the central team.
- Governance loop: a lightweight review (quarterly or per-major-launch) where the central team audits embedded practice against the shared standard, and the embedded engineers propose changes to the standard itself.
How the structure evolves with scale
At small scale (a handful of services), a single centralized team is usually enough: there isn't enough volume to justify per-team specialists, and consistency is cheap to maintain by hand. As the organization grows into dozens or hundreds of engineers across many product lines, the central team's queue becomes the bottleneck, and the case for embedding grows; the central team's job shifts from doing reliability work directly to building the tooling, training, and standards that let embedded engineers do it well without central review on every decision.
Trade-offs and pitfalls
The most common failure of the hybrid is letting the "central standard" calcify into bureaucracy that embedded teams route around, which quietly reverts the organization to a fragmented model with extra process on top. A second pitfall is treating a strong service-ownership culture, where individual teams already feel deep accountability for what they ship, as a substitute for any shared reliability structure at all; without a common vocabulary and toolset, cross-service incidents (a failure in one team's dependency causing another's outage) have no shared playbook and take longer to resolve than they should. Note that the specific mechanics being standardized (SLOs, error budgets, runbook format) are set by dedicated practices elsewhere; the organizational question here is who owns applying them and at what scale, not how those mechanics themselves work.
Unlock Full Question Bank
Get access to all 38 Site Reliability Engineering Principles interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.