Autocoder

Site Reliability Engineer (SRE) Interview Questions and Answers

Last updated 2026-11-19

SRE interviews combine software engineering, systems knowledge and operational judgement. You may be asked to code, to troubleshoot a Linux box live, to design a service for reliability, and to talk through an incident. This page gives 15 worked questions covering the service level vocabulary, burn-rate alerting, incident command, capacity planning, toil and the failure modes that distributed systems actually have.

Numbers in the examples are worked arithmetic you can reproduce. For related background, read the DevOps questions, the Linux command questions and the Kubernetes questions.

Typical loopsCoding, Linux or troubleshooting, system design, incident or on-call scenario, behavioural
VocabularySLI, SLO, SLA, error budget, toil, MTTR, burn rate, blameless post-mortem
Code skillPython or Go for automation and tooling, plus comfort with shell and SQL

Availability arithmetic worth memorising

Convert SLO percentages to allowed downtime quickly. In a 30-day month there are 43,200 minutes. At 99.9 percent the budget is 43.2 minutes; at 99.99 percent it is 4.32 minutes; at 99.5 percent it is 216 minutes. For serial dependencies multiply availabilities: three components at 99.9 percent each give 0.999 cubed, about 99.7 percent. For redundant parallel components, multiply failure probabilities: two independent 99 percent replicas give 1 minus 0.01 times 0.01, which is 99.99 percent, assuming failures are independent, which they often are not.

Site Reliability Engineer (SRE) Interview Questions and Answers: questions with worked answers

  1. 1

    What is the difference between SLI, SLO and SLA?

    easy

    A service level indicator is a measurement of behaviour users care about, such as the fraction of HTTP requests that return non-5xx within 300 ms. A service level objective is the internal target for that indicator over a window, for example 99.9 percent over 30 days. A service level agreement is a contract with customers that includes consequences, such as credits, if the commitment is missed; it is usually looser than the SLO so you have room to react before breaching it. Good SLIs are ratios of good events to valid events measured as close to the user as practical, for example at the load balancer or in the client.

  2. 2

    Explain error budgets and how they are used to make decisions.

    medium

    The error budget is one minus the SLO: the amount of unreliability you are allowed. With a 99.9 percent SLO over 30 days, the budget is 0.1 percent of events, or 43.2 minutes of total unavailability. While budget remains, the team can launch features, run experiments and take risks. When it is exhausted, an agreed policy kicks in: freeze risky releases, prioritise reliability work and fix the causes of burn. The mechanism aligns product and reliability goals around one number and makes the trade-off explicit instead of political. A 100 percent target is almost always wrong because it blocks all change and exceeds what dependencies can deliver.

  3. 3

    How would you alert on an SLO? Explain burn-rate alerting.

    hard

    Burn rate is how fast you consume the budget relative to the rate that would spend it exactly at the end of the window. A burn rate of 1 uses the whole budget in 30 days; a burn rate of 14.4 would consume 2 percent of a 30-day budget in one hour. Multi-window alerts combine a long and a short window to stay both sensitive and quick to reset: page when burn rate exceeds 14.4 over both 1 hour and 5 minutes; page at 6 over 6 hours and 30 minutes; ticket at 1 over 3 days. This catches fast outages and slow leaks while avoiding pages on short blips. Alerting on raw CPU or on a single error spike is noisy and not tied to user impact.

    text
    # Prometheus: page when 1h and 5m error ratios both exceed 14.4 x the 0.1% budget
    (
      sum(rate(http_requests_total{code=~"5.."}[1h])) / sum(rate(http_requests_total[1h])) > (14.4 * 0.001)
    and
      sum(rate(http_requests_total{code=~"5.."}[5m])) / sum(rate(http_requests_total[5m])) > (14.4 * 0.001)
    )
  4. 4

    What is toil and how do you decide what to automate?

    medium

    Toil is operational work that is manual, repetitive, automatable, tactical, without enduring value and scaling linearly with service growth, such as manually restarting a service or resizing disks on request. Google's SRE guidance suggests capping toil at around half of an engineer's time so the rest goes to engineering projects. Prioritise automation by frequency times time cost, risk of human error and how much it blocks others. Not everything deserves automation: a task done twice a year that takes ten minutes does not need a platform. Measure toil through ticket and page analysis and review it regularly.

  5. 5

    Walk through how you would respond to a major production incident.

    medium

    Declare the incident and assign roles: an incident commander who coordinates, an operations lead who investigates and changes systems, and a communications lead who updates stakeholders on a fixed cadence. Prioritise mitigation over root cause: roll back the recent deploy, fail over, shed load or disable a feature flag. Preserve evidence by noting a timeline as you go. Once stable, confirm recovery through the SLI, communicate resolution, and schedule a blameless post-mortem with impact, timeline, root causes and contributing factors, what went well, and action items with owners and dates. Focus on system and process failures, not individual blame.

  6. 6

    A service's p99 latency doubled but the average barely moved. What could cause this and how do you investigate?

    hard

    Averages hide tails. Candidates: garbage collection pauses, a slow dependency or replica affecting a subset of requests, lock contention, cache misses on a cold shard, retries amplifying load, noisy neighbours, or a single bad host. Look at latency by percentile, by endpoint, by host and by dependency; compare traces for slow versus fast requests to find the span that grew; check saturation metrics such as thread pool queue depth and CPU throttling. Fan-out makes it worse: if a request calls 100 backends, the chance that at least one is slow is high, so hedged requests and timeouts help. Always use histograms, not averages.

  7. 7

    Describe the four golden signals and the USE and RED methods.

    easy

    The four golden signals for a service are latency (separating successful and failed requests), traffic, errors and saturation. RED is the request-oriented version for services: rate, errors and duration. USE is for resources such as CPU, disks and network: utilisation, saturation and errors. Together they give a checklist: for each service dashboard, show RED; for each host or pool, check USE. Saturation, the extent to which a resource is full and queueing, is the signal that predicts trouble before errors begin.

  8. 8

    How do you design for graceful degradation and avoid cascading failures?

    hard

    Cascades start when one slow component causes callers to pile up threads and retry, overloading it further. Defences: set timeouts on every remote call, budget retries with exponential backoff and jitter, and cap retries at one layer; use circuit breakers to fail fast when a dependency is unhealthy; apply load shedding and rate limits so an overloaded service rejects excess requests early with a clear status instead of slowing for everyone; use bulkheads to isolate resource pools per dependency; and degrade features, serving cached or default data, when non-critical backends fail. Test with load and chaos experiments, not hope.

    python
    import random, time
    
    def call_with_backoff(fn, attempts=4, base=0.1, cap=2.0):
        """Retry fn with capped exponential backoff and full jitter."""
        for i in range(attempts):
            try:
                return fn()
            except Exception:
                if i == attempts - 1:
                    raise
                delay = random.uniform(0, min(cap, base * (2 ** i)))
                time.sleep(delay)
  9. 9

    How would you do capacity planning for a service expecting a traffic spike?

    medium

    Start from demand: forecast peak requests per second from historical growth plus known events, with headroom. Then load test one instance to find sustainable throughput at the target latency, not at the breaking point; if one instance handles 400 requests per second at p99 under 200 ms, a 12,000 requests per second peak needs 30 instances, plus N+1 or N+2 for failures and zone loss, so with three zones that is 45 so that losing a zone still leaves 30. Check non-linear bottlenecks: database connections, downstream limits, cache hit rate and network egress. Autoscaling covers gradual change but not instant spikes, so pre-scale before known events and keep quotas raised.

  10. 10

    What makes a good post-mortem, and what makes a bad one?

    easy

    A good one is blameless, factual and specific: a timeline with timestamps, user impact quantified against the SLO, the trigger and the underlying contributing causes, detection and response gaps, and a short list of prioritised actions with owners that remove classes of failure, such as better rollout safeguards. A bad one names a person as root cause, stops at human error, lists vague actions like be more careful, or is never followed up. Track action items to completion and share the document widely so other teams learn. Ask why five times, but stop when the answer becomes a process or system you can change.

  11. 11

    Write a script that parses an access log and reports the top five URLs by 5xx error count.

    medium

    Read line by line to keep memory constant, parse the status and path with a regular expression for the common log format, count with a dictionary or Counter, and print the top n. State complexity: O(n) time over n lines and O(u) space for u distinct URLs. In production you would also strip query strings to avoid cardinality blow-up and handle malformed lines instead of crashing. For a quick shell version, awk and sort do the same job.

    python
    import re, sys
    from collections import Counter
    
    LINE = re.compile(r'"[A-Z]+ (?P<path>\S+) [^"]*" (?P<status>\d{3}) ')
    
    def top_5xx(lines, n=5):
        errors = Counter()
        for line in lines:
            m = LINE.search(line)
            if m and m.group('status').startswith('5'):
                errors[m.group('path').split('?')[0]] += 1
        return errors.most_common(n)
    
    if __name__ == '__main__':
        with open(sys.argv[1]) as f:
            for path, count in top_5xx(f):
                print(f'{count:6d}  {path}')
    bash
    awk '$9 ~ /^5/ {split($7,a,"?"); c[a[1]]++} END {for (u in c) print c[u], u}' access.log | sort -rn | head -5
  12. 12

    A Linux server is slow. What is your triage order?

    medium

    Check load and what is saturated first. uptime shows load averages, top or htop shows CPU, memory and top processes, vmstat 1 shows run queue, swap activity and IO wait, iostat -x shows disk utilisation and await, free -m shows memory, and df -h with df -i shows disk and inode exhaustion. Then ss -s and ss -tanp for connection states, dmesg -T for OOM kills and hardware errors, and journalctl for service logs. Decide whether the bottleneck is CPU, memory, disk or network, then drill into the offending process with strace or perf if needed. See the Linux commands questions for more.

    bash
    uptime; free -m; df -h; df -i
    vmstat 1 5
    iostat -x 1 3
    ss -s
    dmesg -T | tail -20
    ps aux --sort=-%cpu | head
  13. 13

    How do you roll out a risky change safely at scale?

    medium

    Reduce blast radius with progressive delivery: deploy to a canary slice or one low-risk cell first, compare its SLIs against the baseline automatically, then widen in steps, pausing or rolling back on regression. Gate on automated checks, keep changes small and reversible, use feature flags so exposure is decoupled from deployment, and avoid changing multiple layers at once. Define rollback before rollout and test it. For data changes use expand and contract migrations. Avoid rollouts at peak or just before weekends, and make sure someone is watching dashboards with authority to stop.

  14. 14

    Explain the CAP theorem and how it affects reliability design.

    hard

    In a network partition, a distributed data store must choose between consistency (every read sees the latest write, possibly by rejecting requests) and availability (every request gets a response, possibly stale). Partitions cannot be ruled out, so the real choice is CP or AP behaviour during one. CP systems such as etcd, ZooKeeper and Spanner favour correctness; AP systems such as Cassandra with tunable consistency or DynamoDB with eventual reads favour responsiveness. PACELC extends this: even without partitions there is a latency versus consistency trade-off. Choose per use case: balances need consistency, a product view counter can be stale.

  15. 15

    How do you handle on-call fairly and reduce alert fatigue?

    easy

    Every page should be urgent, actionable and need a human; if not, delete it, turn it into a ticket or automate the fix. Review each week's pages for noise, and track pages per shift with a target such as at most two incidents per 12-hour shift so engineers have time to fix causes. Attach a runbook link to every alert, rotate fairly across time zones with follow-the-sun where possible, give time off after heavy nights, and compensate on-call. Use symptom-based alerts tied to SLOs rather than cause-based ones for every component, and keep a clear escalation path.

Frequently asked questions

What is the difference between SRE and DevOps?

DevOps is a cultural and tooling movement to join development and operations. SRE is a specific engineering discipline that treats operations as a software problem, using SLOs, error budgets and a toil cap. Many teams do both under different titles.

Do SRE interviews include data structures and algorithms?

Often at a lighter level than software engineer interviews, with an emphasis on practical coding such as parsing, scripting and concurrency. Prepare easy to medium problems and be ready to explain complexity.

How should a fresher prepare for an SRE role?

Learn Linux and networking deeply, write Python or Go tools, run a small service with monitoring and an SLO on a cloud VM, and read public post-mortems. Being able to explain a failure you caused and fixed in a project is valuable.

What is MTTR and why is it not enough on its own?

Mean time to recovery averages how long it takes to restore service, but averages hide long-tail incidents and say nothing about how often failures occur. Pair it with incident frequency and SLO attainment.

Related guides

More in Role-wise Interview Questions by Job and Tech Stack

See all in this section