Prev Next

Tools / Site Reliability Engineering (SRE) Interview questions

Last updated

1. What is Site Reliability Engineering (SRE)? 2. What is a Service Level Indicator (SLI)? 3. What is a Service Level Objective (SLO)? 4. What is a Service Level Agreement (SLA)? 5. What is an error budget? 6. What are the four golden signals of monitoring? 7. What is toil in SRE? 8. What is a blameless postmortem? 9. What is observability? 10. What is incident management in SRE? 11. What is an on-call rotation in SRE? 12. What is a runbook? 13. What is capacity planning in SRE? 14. What is a canary deployment? 15. What is the purpose of a load balancer in a reliable system? 16. What is chaos engineering? 17. What is the purpose of health checks? 18. What are black-box and white-box monitoring? 19. What are the USE and RED methods? 20. What is distributed tracing? 21. What is the difference between SRE and DevOps? 22. Why do SREs cap toil at 50 percent of their time? 23. How do you calculate downtime allowed by an SLO? 24. What happens when the error budget is exhausted? 25. How do you choose good SLIs for a service? 26. Why is 100 percent availability the wrong target? 27. How does multi-window burn rate alerting work? 28. Why should alerts be symptom-based rather than cause-based? 29. Explain the lifecycle of an incident? 30. When should you roll back instead of fix forward? 31. What is the difference between MTTR, MTTD, and MTBF? 32. How do you reduce alert fatigue? 33. How does a circuit breaker improve reliability? 34. Why use exponential backoff with jitter for retries? 35. What is the difference between rate limiting and load shedding? 36. How do you design graceful degradation? 37. How do you troubleshoot a sudden latency spike? 38. Why are percentiles better than averages for latency? 39. How does progressive delivery reduce deployment risk? 40. How do you perform load testing before a launch? 41. How do you design a multi-region failover strategy? 42. What is a Production Readiness Review? 43. How do you set RTO and RPO for a service? 44. What is the difference between horizontal and vertical scaling? 45. How do you handle cascading failures? 46. Explain the internal working of Prometheus scraping and alerting? 47. What makes a postmortem action item effective? 48. How do you calculate the composite availability of dependent services? 49. Why use infrastructure as code for reliability? 50. How do you troubleshoot a Kubernetes pod stuck in CrashLoopBackOff?

1. What is Site Reliability Engineering (SRE)?

Site Reliability Engineering is a discipline that applies software engineering practices to infrastructure and operations problems. It started at Google, where engineers were asked to run production systems by writing code instead of doing repetitive manual work.

An SRE team owns the reliability of a service: availability, latency, performance, capacity, and incident response. Reliability is treated as a measurable feature, tracked with SLIs and SLOs rather than gut feeling.

Typical SRE work includes:

  • Defining and monitoring service level objectives
  • Automating deployments, scaling, and recovery
  • Leading incident response and writing postmortems
  • Reviewing capacity and system design before launch

The goal is not zero outages. It is to keep a service reliable enough for users while still letting developers ship quickly.

Take quiz
What is the core idea behind SRE?
Replacing developers with operations staff
Applying software engineering to operations problems
Avoiding all production changes
Running servers manually for better control
In SRE, reliability is best described as:
A feeling reported by the support team
Something only tested before release
A measurable feature tracked with SLIs and SLOs
A task owned only by the network team

2. What is a Service Level Indicator (SLI)?

An SLI is a quantitative measurement of one aspect of how a service behaves for its users. It is the raw metric that SLOs and SLAs are built on.

Most SLIs are expressed as a ratio of good events to total events, which gives a clean percentage between 0 and 100.

SLI = (good events / valid events) x 100

Example: 999,200 successful requests / 1,000,000 total = 99.92%

Common SLIs:

  • Availability: share of requests that return a non-error response
  • Latency: share of requests served faster than a threshold, such as 300 ms
  • Freshness: share of data updated within an expected window
  • Correctness: share of responses that return the right result

A good SLI reflects what the user experiences, so it is usually measured at the load balancer or client, not on a single server.

Take quiz
An SLI is usually expressed as:
A monthly payment penalty
The number of servers in a cluster
A list of on-call engineers
A ratio of good events to valid events
Which of these is a latency SLI?
Percentage of requests completed in under 300 ms
Number of engineers on call
Total CPU cores allocated
Count of Git commits per week

3. What is a Service Level Objective (SLO)?

An SLO is the target value, or range, that an SLI should meet over a defined period. It states how reliable the team commits to keep a service.

An example: "99.9% of HTTP requests succeed over a rolling 28 days". The SLI is the success ratio, the SLO is the 99.9% target, and the window is 28 days.

SLOs matter because they:

  • Give product and engineering a shared definition of 'reliable enough'
  • Create the error budget that guides release decisions
  • Tell the team when to invest in reliability and when to ship features

An SLO should be set tighter than the SLA but based on what users actually need, not on what the system happens to achieve today.

Take quiz
What does an SLO define?
The hardware vendor for a service
A target for an SLI over a time window
The number of daily deployments
The legal penalty for downtime
Which statement is an SLO?
Requests per second at the load balancer
Error rate right now is 0.2%
99.9% of requests succeed over a rolling 28 days
The checkout service uses three replicas

4. What is a Service Level Agreement (SLA)?

An SLA is a formal contract between a provider and a customer that promises a certain level of service and states the consequences, usually financial credits, if the promise is broken.

SLAs are business and legal documents. SLOs are engineering targets. SRE teams set internal SLOs stricter than the SLA so they get a warning before the contractual line is crossed.

SLO SLA
Internal target Contract with customer
Drives engineering decisions Drives refunds or credits
Missing it triggers reliability work Missing it triggers penalties

Not every service needs an SLA. Internal services often have SLOs only.

Take quiz
What makes an SLA different from an SLO?
An SLA is a monitoring dashboard
An SLA is a deployment pipeline
An SLA is an internal alert threshold
An SLA is a contract with consequences for missing it
Why set the SLO tighter than the SLA?
To get early warning before breaching the contract
To reduce the number of metrics collected
To avoid writing postmortems
To remove the need for on-call

5. What is an error budget?

An error budget is the amount of unreliability a service is allowed within its SLO period. It is simply 100% minus the SLO target.

With a 99.9% availability SLO over 30 days, the budget is 0.1%, which is about 43 minutes of downtime or the equivalent share of failed requests.

The budget turns reliability into a spending decision. While budget remains, teams can ship risky features, run experiments, and do maintenance. When it runs out, the team slows releases and focuses on stability.

This removes the usual argument between developers who want speed and operators who want safety, because both follow the same number.

Take quiz
If the SLO is 99.9%, the error budget is:
99.9% of requests
0.1% of requests or time in the window
10% of requests
There is no budget
An error budget mainly helps teams:
Count the number of servers
Replace code reviews
Balance release velocity against reliability
Estimate cloud billing

6. What are the four golden signals of monitoring?

The four golden signals come from the Google SRE book. If you can only measure four things on a user-facing service, measure these.

Signal What it tells you
Latency Time to serve a request. Track successful and failed requests separately.
Traffic Demand on the system, such as requests per second.
Errors Rate of failed requests, explicit (HTTP 500) or implicit (wrong content).
Saturation How full the most constrained resource is, such as CPU, memory, or queue depth.

Saturation is the one people forget. Many systems degrade well before a resource hits 100%, so watching the trend helps you act early.

Take quiz
Which is NOT one of the four golden signals?
Latency
Traffic
Saturation
Code coverage
Saturation measures:
How full the most constrained resource is
How many users signed up
How many alerts were muted
How long a build takes

7. What is toil in SRE?

Toil is operational work that is manual, repetitive, automatable, tactical, and grows linearly as the service grows. It produces no lasting improvement.

Examples include manually restarting a stuck process every night, hand-creating user accounts, or copying logs to a bucket for each audit request.

Not all operational work is toil. Writing a postmortem or designing a new alert is overhead or engineering work because it creates lasting value.

SREs aim to spend no more than about 50% of their time on toil. The remainder goes to engineering projects that remove toil, such as automation and self-healing tools.

Take quiz
Which task is the best example of toil?
Designing a new capacity model
Manually restarting a service every night
Writing a postmortem after an outage
Building an auto-remediation tool
Toil is characterized by being:
Creative and one-off
Strategic and long-term
Manual, repetitive, and automatable
Rare and unpredictable

8. What is a blameless postmortem?

A blameless postmortem is a written review of an incident that focuses on how the system and process allowed the failure, not on who caused it.

The assumption is that people act reasonably with the information they had. If one engineer's mistake can take down production, the real problem is a missing guardrail, review step, or test.

A good postmortem contains:

  • Summary, impact, and duration
  • Timeline of detection, response, and recovery
  • Root cause and contributing factors
  • What went well and what went badly
  • Action items with owners and due dates

Blamelessness encourages honest reporting, which is the only way an organization learns from failures.

Take quiz
A blameless postmortem focuses on:
Finding the engineer to discipline
Hiding the incident from customers
Reducing the team's headcount
System and process gaps that enabled the failure
Why is blamelessness important?
It encourages honest reporting so teams can learn
It removes the need for action items
It avoids documenting the timeline
It guarantees no repeat incidents

9. What is observability?

Observability is the ability to understand what is happening inside a system by looking at the data it emits. A system is observable when you can ask new questions about its behaviour without shipping new code.

It is built on three main signals:

Pillar Best used for
Metrics Numeric time series, cheap to store, good for alerting and trends.
Logs Timestamped event records, good for detail on a single event.
Traces The path of one request across services, good for finding where time was spent.

Monitoring tells you that something is wrong. Observability helps you find out why, especially for failures you did not predict.

Take quiz
Which three signals form the basis of observability?
Builds, tests, and releases
Metrics, logs, and traces
CPU, RAM, and disk only
Tickets, chats, and emails
Traces are most useful for:
Storing billing history
Counting total CPU cores
Following one request across multiple services
Managing user passwords

10. What is incident management in SRE?

Incident management is the structured process for detecting, responding to, resolving, and learning from events that disrupt a service.

The aim is to restore service quickly and keep chaos low. Mature teams define roles ahead of time:

  • Incident Commander: coordinates the response and makes decisions
  • Operations lead: runs the actual technical fixes
  • Communications lead: updates stakeholders and customers
  • Scribe: records the timeline as it happens

A severity scale (for example SEV1 to SEV4) decides how many people get paged and how often updates are sent. After recovery, the team writes a postmortem to prevent repeats.

Take quiz
Who coordinates the response in a major incident?
The scribe
The newest team member
The customer
The Incident Commander
What is the purpose of a severity scale?
To decide response level and communication frequency
To rank engineers by seniority
To set cloud pricing tiers
To choose the programming language

11. What is an on-call rotation in SRE?

An on-call rotation is a schedule in which engineers take turns being the first responder for production alerts outside normal working hours.

A sustainable rotation usually has these traits:

  • Primary and secondary responders so one missed page is not fatal
  • Shifts of about a week, with a fair handoff
  • Pages only for urgent, actionable issues
  • Compensation or time off for out-of-hours work
  • A handoff note listing open issues and recent changes

Google suggests keeping the on-call load low enough that engineers can handle incidents calmly. Too many pages cause burnout and slow responses.

Take quiz
Why have a secondary on-call responder?
To double the number of alerts
To act as backup if the primary does not respond
To avoid writing runbooks
To replace the primary permanently
Which alerts should page the on-call engineer?
Every informational log line
Weekly summary reports
Urgent and actionable ones
All warnings regardless of impact

12. What is a runbook?

A runbook is a documented set of steps for handling a known operational task or alert, such as restarting a service, failing over a database, or clearing a full queue.

A useful runbook is linked directly from the alert and includes:

  • What the alert means and how serious it is
  • Quick diagnostic commands and dashboards
  • Step-by-step remediation, with expected output
  • Escalation contacts and rollback steps

Runbooks let a tired engineer at 3 a.m. act without guessing. Frequently used runbooks are good candidates for automation, which turns documented toil into a script or self-healing job.

Take quiz
A runbook is best linked from:
The company brochure
The billing portal
A random wiki homepage
The alert that triggers its use
A frequently executed runbook should eventually be:
Automated
Deleted
Printed and archived
Kept manual forever

13. What is capacity planning in SRE?

Capacity planning is forecasting how much compute, storage, and network a service needs so it keeps meeting its SLOs as demand grows.

The process usually looks like this:

  1. Measure current usage and per-resource limits
  2. Forecast organic growth from historical data
  3. Add expected spikes, such as launches and sales
  4. Include headroom for failures, for example losing one zone
  5. Order or provision capacity ahead of lead time

Load tests help confirm limits instead of guessing. The goal is to avoid both outages from running out of capacity and wasted cost from over-provisioning.

Take quiz
Why include headroom in capacity planning?
To increase cloud spending
To survive failures such as losing a zone
To avoid forecasting
To reduce monitoring needs
Which input improves a capacity forecast?
The team's coffee consumption
Last year's marketing slogan
Historical usage trends and planned launches
The number of Slack channels

14. What is a canary deployment?

A canary deployment releases a new version to a small share of traffic first, for example 1% to 5%, while the rest continues on the stable version.

The team compares the canary against the baseline using metrics like error rate and latency. If it looks healthy, traffic is increased in steps until 100%. If not, traffic is routed back and the release is stopped, limiting the blast radius.

flowchart LR
  A["Deploy new version"] --> B["Send 5% traffic"]
  B --> C{Metrics healthy?}
  C -- Yes --> D["Increase traffic"]
  D --> E["100% rollout"]
  C -- No --> F["Roll back"]

The name comes from canaries once used in coal mines as an early warning of danger.

Take quiz
What does a canary deployment do first?
Switches all users at once
Deletes the old version
Disables monitoring
Sends a small share of traffic to the new version
If canary metrics look bad, the team should:
Route traffic back and stop the rollout
Increase traffic faster
Ignore the metrics
Delete the dashboards

15. What is the purpose of a load balancer in a reliable system?

A load balancer spreads incoming requests across multiple healthy backends so no single instance is overloaded and one failure does not take the service down.

For reliability it does three jobs:

  • Distributes traffic using algorithms such as round robin or least connections
  • Runs health checks and removes failed backends from rotation
  • Enables rolling updates by draining connections before a node is replaced

Layer 4 balancers route by IP and port and are very fast. Layer 7 balancers read HTTP details and can route by path or header, which also supports canary releases.

Take quiz
A load balancer improves reliability by:
Storing user passwords
Removing unhealthy backends from rotation
Compiling application code
Encrypting the database at rest
Which type can route requests by URL path?
Layer 1 hub
Layer 2 switch only
Layer 7 load balancer
A DNS TTL setting

16. What is chaos engineering?

Chaos engineering is the practice of deliberately injecting failures into a system, such as killing instances or adding network latency, to confirm it handles them as designed.

A typical experiment follows these steps:

  1. Define the steady state, for example 99.9% success rate
  2. Form a hypothesis: the system stays steady if one node dies
  3. Inject the failure with a limited blast radius
  4. Compare results with the steady state
  5. Fix any weakness found and repeat

Tools include Chaos Monkey, Gremlin, and LitmusChaos. Teams usually start in staging, then move to controlled production experiments with a quick abort switch.

Take quiz
What is the first step of a chaos experiment?
Delete the production database
Disable all alerts
Skip the hypothesis
Define the steady state
Chaos engineering is used to:
Verify resilience by injecting controlled failures
Replace unit tests
Increase traffic costs
Hide bugs from users

17. What is the purpose of health checks?

A health check is an automated probe that tells infrastructure whether an instance is able to serve traffic. Load balancers, orchestrators, and service meshes use the result to route or restart.

There are two common kinds:

Check Question Action on failure
Liveness Is the process alive or stuck? Restart the container
Readiness Is it ready to take requests? Remove from load balancer until ready

Keep checks cheap and meaningful. A check that only returns 200 without testing a critical dependency can hide real problems, while one that fails on every dependency blip can cause cascading restarts.

Take quiz
A failed readiness probe usually causes:
The cluster to be deleted
The instance to stop receiving traffic
The code to be rebuilt
The logs to be erased
A liveness probe checks whether:
The user is logged in
The invoice is paid
The process is alive and not stuck
The disk is encrypted

18. What are black-box and white-box monitoring?

Black-box monitoring tests the system from the outside, the way a user would, such as a probe requesting a page every minute. It shows symptoms that are happening now.

White-box monitoring uses internal data like metrics, logs, and traces exposed by the application. It helps explain causes and can reveal problems before users notice.

Black-box White-box
External probes and synthetic checks Internal metrics, logs, traces
Detects user-visible symptoms Explains causes and trends
Example: ping the login page Example: queue depth, GC pause

Good setups use both: black-box for paging on symptoms, white-box for diagnosis.

Take quiz
Which is an example of black-box monitoring?
A heap usage metric
A trace span inside a service
A thread pool gauge
A synthetic probe requesting the login page
White-box monitoring is most useful for:
Diagnosing causes using internal data
Testing only from the customer network
Replacing all alerts
Measuring ISP speed

19. What are the USE and RED methods?

Both are checklists for choosing metrics, so you do not forget something important.

The USE method (Brendan Gregg) is for resources such as CPU, memory, disk, and network. For each, check Utilization, Saturation, and Errors.

The RED method (Tom Wilkie) is for request-driven services. For each service, track Rate, Errors, and Duration.

USE RED
Resources (CPU, disk, NIC) Services (APIs, microservices)
Utilization, Saturation, Errors Rate, Errors, Duration

In practice, use RED to see if users are affected and USE to find the stressed resource behind it.

Take quiz
The RED method stands for:
Restart, Edit, Deploy
Rate, Errors, Duration
Read, Evict, Delete
Route, Encrypt, Decode
USE is best applied to:
Marketing campaigns
Pull request reviews
Infrastructure resources such as CPU and disk
Customer invoices

20. What is distributed tracing?

Distributed tracing records the journey of a single request as it passes through multiple services, so you can see where time is spent and where errors occur.

Each request gets a trace ID. Every operation along the way creates a span with a start time, duration, and a pointer to its parent span. The trace ID is propagated through HTTP headers, for example the W3C traceparent header.

sequenceDiagram
  Client->>Gateway: GET /order
  Gateway->>OrderSvc: trace-id abc
  OrderSvc->>DB: query
  DB-->>OrderSvc: rows
  OrderSvc-->>Gateway: 200
  Gateway-->>Client: 200

OpenTelemetry, Jaeger, and Zipkin are common tools. Traces make it easy to see, for instance, that 800 ms of a 900 ms request was a slow database call.

Take quiz
What links spans into one trace?
The same server hostname
The same git commit
A matching log file name
A shared trace ID passed between services
Tracing is most helpful for finding:
Which service in a request path is slow
Which employee wrote the code
How many users signed up
The cost of a licence

21. What is the difference between SRE and DevOps?

DevOps is a culture and set of practices that break down walls between development and operations. SRE is a specific, prescriptive way of doing that, with defined metrics, budgets, and roles. Google describes it as "class SRE implements interface DevOps".

DevOps SRE
Culture and collaboration across the delivery pipeline Reliability engineering with measurable targets
Few fixed rules, varies per company Explicit SLOs, error budgets, toil limits
Focus: faster, more frequent delivery Focus: reliability while delivering
Roles are often shared Dedicated SRE team or role

They overlap heavily. A team can adopt DevOps culture and use SRE techniques such as error budgets to make the trade-offs concrete.

Take quiz
Which concept is specific to SRE rather than generic DevOps?
Using version control
Error budgets tied to SLOs
Holding daily standups
Writing unit tests
DevOps is best described as:
A single monitoring tool
A cloud provider
A culture and set of practices spanning dev and ops
A programming language

22. Why do SREs cap toil at 50 percent of their time?

The 50% cap protects the engineering half of the job. If toil grows past that, the team has no time to build automation, so toil grows further and the team spirals into pure ticket handling.

Because toil scales linearly with service size, a team that only does manual work needs to be hired in proportion to growth. Engineering work breaks that link, since a script written once serves any size.

When a team goes over the cap, Google's guidance is to hand the excess operational work back to the developers or pause it, so the team can clear toil. Teams track it with surveys or ticket tagging, and review it every quarter.

The number is a guideline, but the principle holds: operations work must not crowd out engineering work.

Take quiz
What problem does the 50% toil cap prevent?
Cloud bills getting too low
Developers writing too much code
Too many dashboards
A team having no time left to automate work away
Why does toil scale badly?
It grows linearly with service size
It shrinks as traffic grows
It is always one-time work
It only appears in test systems

23. How do you calculate downtime allowed by an SLO?

Multiply the error budget (100% minus the SLO) by the length of the window.

allowed downtime = (1 - SLO) x window

99.9%  x 30 days = 0.001 x 43,200 min = 43.2 minutes
99.99% x 30 days = 0.0001 x 43,200 min = 4.32 minutes

SLO (30 days) Allowed downtime
99% 7.2 hours
99.9% 43.2 minutes
99.95% 21.6 minutes
99.99% 4.32 minutes

For request-based SLOs, apply the same idea to events. With 10 million requests and a 99.9% SLO, you can afford 10,000 failed requests in the window.

Take quiz
Allowed downtime for a 99.9% SLO over 30 days is about:
4 minutes
43 minutes
7 hours
3 days
With 10 million requests and a 99.9% SLO, how many failures are allowed?
100
1,000,000
10,000
99,000

24. What happens when the error budget is exhausted?

When the budget runs out, the service has used all the unreliability its SLO allows, so the team shifts focus from features to stability. The exact policy should be written down and agreed in advance as an error budget policy.

Typical actions:

  • Freeze non-critical feature releases until the budget recovers
  • Allow only reliability fixes and security patches
  • Prioritize postmortem action items
  • Review recent changes that burned the most budget
  • Escalate to leadership if the freeze is disputed

The policy removes the debate. Product knows the rule beforehand, and engineers do not have to argue for stability work after every outage. When the rolling window slides past the bad period, budget returns and releases resume.

Take quiz
What is a common response to an exhausted error budget?
Raise the SLO target immediately
Delete the monitoring system
Release faster to make up lost time
Pause feature releases and focus on reliability
Why write an error budget policy beforehand?
So the response is agreed and not debated mid-crisis
To hide outages from customers
To avoid measuring SLIs
To skip postmortems

25. How do you choose good SLIs for a service?

Start from what users care about, not from what is easy to measure. Ask: what does a successful interaction look like for this service?

Service type Typical SLIs
Request-driven API Availability, latency of successful requests
Data pipeline Freshness, correctness, throughput
Storage system Durability, availability, latency
Batch job Completion within deadline, success rate

Then follow these rules:

  • Measure as close to the user as practical, such as at the load balancer
  • Use a ratio of good events over valid events
  • Keep the list short, usually 2 to 4 SLIs per service
  • Exclude requests that are the client's fault, such as HTTP 4xx errors, where appropriate

CPU usage is rarely a good SLI. Users do not care about CPU; they care whether the page loads.

Take quiz
Which is the best SLI for a data pipeline feeding reports?
Number of developers
Freshness of the data
CPU temperature
Disk brand
Good SLIs should be measured:
Only on the database host
Only during outages
As close to the user experience as practical
Only by hand once a year

26. Why is 100 percent availability the wrong target?

It is almost never achievable, and chasing it costs far more than it returns. Each extra nine usually costs about ten times more in engineering effort and infrastructure.

Users also cannot tell the difference. Their phone, home Wi-Fi, and ISP fail more often than a 99.99% service, so extra reliability beyond that is invisible to them.

A 100% target also leaves no error budget. Without any room for failure, every deploy is a risk and the team stops shipping. SRE sets the target at the level users need, then uses the remaining budget to move faster.

Pick the lowest reliability that keeps users happy, and spend the savings on features.

Take quiz
Why do users often not notice 99.99% vs 100%?
Dashboards hide the difference
Servers never fail
Browsers fix server errors
Their own devices and networks fail more often
A 100% SLO would leave:
No error budget for change or failure
An unlimited error budget
A cheaper cloud bill
Faster releases

27. How does multi-window burn rate alerting work?

Burn rate is how fast the error budget is being consumed compared with the rate that would use exactly the whole budget by the end of the window.

burn rate = observed error rate / (1 - SLO)

SLO 99.9%, error rate 1.44%  ->  burn rate = 14.4

A burn rate of 1 uses the budget exactly over the full period. A rate of 14.4 sustained for one hour consumes 2% of a 30-day budget, which is worth a page.

The multi-window approach pairs a long window with a short one, usually 1/12 the length. Both must exceed the threshold to fire.

Windows Burn rate Budget used Action
1 hour + 5 min 14.4 2% of budget Page
6 hours + 30 min 6 5% of budget Page
3 days + 6 hours 1 10% of budget Ticket

The long window gives precision, and the short window makes the alert reset quickly after the issue is fixed.

Take quiz
A burn rate of 1 means:
The service is down
The budget would be used exactly by the end of the window
No budget is consumed
The budget doubles
Why pair a long window with a short window?
To triple the number of pages
To avoid defining an SLO
Long gives precision, short makes the alert reset quickly
To hide short outages

28. Why should alerts be symptom-based rather than cause-based?

Symptoms are what users feel, such as errors and slow pages. Causes are the many things that might produce those symptoms, such as high CPU, full disk, or a bad deploy.

Paging on symptoms has clear advantages:

  • Every page matches real user pain, so it is worth waking someone
  • You catch problems from causes you never predicted
  • You need fewer alerts, as one symptom covers many causes
  • High CPU with no user impact does not page anyone

Cause-based signals still matter, but as dashboard panels or low-urgency tickets used during diagnosis. A good rule: page when the SLO is at risk, and investigate causes from dashboards.

Take quiz
Which alert is symptom-based?
CPU above 80% on one node
Disk at 70% on a replica
A pod restarted once
Checkout error rate above 2% for 5 minutes
Cause-based signals are best used for:
Dashboards and diagnosis
Paging at night for every spike
Replacing SLOs
Billing customers

29. Explain the lifecycle of an incident?

An incident moves through a series of stages, from the first signal to the lessons learned afterwards.

flowchart LR
  A[Detect] --> B[Triage]
  B --> C[Mitigate]
  C --> D[Resolve]
  D --> E[Postmortem]
  E --> F[Prevent]
  1. Detect: an alert or user report signals a problem
  2. Triage: assess severity and assign roles such as incident commander
  3. Mitigate: stop the user impact first, by rollback, failover, or traffic shift
  4. Resolve: fix the underlying cause once users are safe
  5. Postmortem: write a blameless review with a timeline
  6. Prevent: complete action items so it does not repeat

The key idea is mitigate before root cause. Restoring service quickly matters more than understanding everything while users are down.

Take quiz
What should come first during an incident?
Finding who to blame
Mitigating user impact
Writing the final report
Redesigning the system
Which stage produces action items to avoid repeats?
Detect
Triage
Postmortem
Mitigate

30. When should you roll back instead of fix forward?

Roll back when a recent change is the likely cause, the rollback is safe and quick, and the user impact is ongoing. A rollback is a known state, while a fix is a new, untested change made under pressure.

Fix forward is better in cases where rolling back is not safe or possible:

  • A database migration already ran and is not reversible
  • The old version cannot read data written by the new one
  • The fix is a small, well-understood config change that is faster than a full redeploy
  • A security patch must not be removed

A good default for the on-call is: if the last change is suspect and rollback is safe, roll back first, then investigate with calm. Design deployments with backward-compatible schema changes so rollbacks stay possible.

Take quiz
When is rollback usually the best choice?
The change was a security patch that must stay
The migration cannot be undone
There was no recent change
A recent deploy likely caused ongoing impact and rollback is safe
Why does rollback reduce risk?
It returns to a previously known working state
It deletes all logs
It skips testing forever
It adds new features

31. What is the difference between MTTR, MTTD, and MTBF?

These are three time-based reliability metrics, each describing a different part of the failure cycle.

Metric Full name Measures
MTTD Mean Time To Detect Time from failure start to detection
MTTR Mean Time To Recover/Restore Time from detection to service restored
MTBF Mean Time Between Failures Average uptime between one failure and the next

To improve reliability you can raise MTBF with better design and testing, or lower MTTD and MTTR with better alerts, runbooks, and automation.

Be careful with MTTR, as the "R" can mean repair, recover, or resolve. Agree on one definition. Also, means hide outliers, so SRE teams often look at percentiles of recovery time too.

Take quiz
Which metric measures time to notice a failure?
MTBF
MTTD
MTTR
SLA
MTBF describes:
Time to detect a failure
Time to write a postmortem
Average time between failures
Time to deploy code

32. How do you reduce alert fatigue?

Alert fatigue happens when responders get so many pages that they start ignoring them. The cure is to make each page rare, urgent, and actionable.

  1. Audit every alert: if nobody acts on it, delete or demote it
  2. Page on SLO burn and symptoms, not on every cause
  3. Group related alerts so one incident creates one page
  4. Use for: durations to ignore short blips
  5. Route low-urgency alerts to tickets or chat
  6. Link a runbook to every page
  7. Review the on-call page count weekly and fix noisy sources

Google's rule of thumb is that on-call should handle at most about two incidents per 12-hour shift, so each one gets proper attention and a postmortem.

Take quiz
What should happen to an alert nobody acts on?
It should page more often
It should be duplicated
It should be kept forever
It should be removed or turned into a lower-urgency notice
Grouping related alerts helps by:
Creating one page per incident instead of many
Hiding the incident
Increasing disk usage
Disabling dashboards

33. How does a circuit breaker improve reliability?

A circuit breaker stops a service from repeatedly calling a dependency that is failing. It fails fast instead of waiting on timeouts, which protects threads, connections, and the failing dependency itself from extra load.

It has three states:

stateDiagram-v2
  [*] --> Closed
  Closed --> Open: failures exceed threshold
  Open --> HalfOpen: after timeout
  HalfOpen --> Closed: trial calls succeed
  HalfOpen --> Open: trial call fails
  • Closed: calls pass through normally
  • Open: calls fail immediately with a fallback or error
  • Half-open: a few trial calls test whether the dependency recovered

Libraries such as Resilience4j and Polly implement this pattern, and service meshes like Istio offer it as outlier detection.

Take quiz
In which state does a circuit breaker fail calls immediately?
Closed
Open
Half-open
Idle
What does the half-open state do?
Permanently blocks all calls
Deletes the dependency
Sends trial calls to test dependency recovery
Doubles the timeout

34. Why use exponential backoff with jitter for retries?

Retrying immediately when a dependency is struggling makes the problem worse. Exponential backoff spaces retries further apart each time, giving the dependency room to recover.

Backoff alone is not enough. If 10,000 clients fail together, they all retry at the same moments, creating repeated spikes called a thundering herd. Jitter adds randomness so retries spread out.

delay = random(0, min(cap, base * 2^attempt))

base=100ms, cap=30s
attempt 1: 0-200ms, attempt 2: 0-400ms, attempt 3: 0-800ms

Also set a maximum retry count and a retry budget, and only retry idempotent operations. Unlimited retries across several layers can multiply load many times over.

Take quiz
What problem does jitter solve?
Slow disk writes
Expired certificates
Missing log lines
Synchronized retries creating repeated traffic spikes
Retries should generally be limited to:
Idempotent operations with a maximum attempt count
Every operation, forever
Only delete operations
Only operations that already succeeded

35. What is the difference between rate limiting and load shedding?

Both protect a service from overload, but they decide differently and for different reasons.

Rate limiting Load shedding
Caps how much each client or key may send Drops excess requests when the server is overloaded
Based on a per-client quota Based on current server health, such as queue length or CPU
Fair usage and abuse prevention Survival under unexpected overload
Returns HTTP 429 Often returns HTTP 503

Rate limiting is proactive and policy-driven. Load shedding is reactive and protects the service when total demand exceeds capacity, often dropping low-priority traffic first so critical requests still succeed. Most production systems use both.

Take quiz
Load shedding is triggered mainly by:
A client's monthly plan
The server's current overload state
The programming language
The deployment time
Which status code usually accompanies rate limiting?
HTTP 200
HTTP 301
HTTP 429
HTTP 101

36. How do you design graceful degradation?

Graceful degradation means a service keeps delivering its core function when a part of it fails, instead of failing completely.

Steps to design it:

  1. Rank features: which are critical and which are optional
  2. Map each feature's dependencies
  3. Decide a fallback for each optional dependency
  4. Add timeouts and circuit breakers so slow dependencies do not block the page
  5. Test the fallbacks with failure injection

Examples: a shop hides personalized recommendations and shows popular items when the recommendation service is down. A search page serves cached results when the index is slow. A video app lowers quality instead of buffering.

The checkout path should never depend on a non-essential service.

Take quiz
Which is an example of graceful degradation?
Showing a blank page
Crashing the checkout
Restarting all servers daily
Showing popular items when the recommendation service is down
What should be done first when designing degradation?
Rank features as critical or optional
Buy more servers
Remove all caches
Disable timeouts

37. How do you troubleshoot a sudden latency spike?

Work from the symptom inward, and check recent changes first, as most incidents are caused by change.

  1. Scope it: all users or some? One region, endpoint, or customer?
  2. Check recent changes: deploys, config flags, infra updates
  3. Look at golden signals: did traffic or errors also change?
  4. Break down by layer using traces: load balancer, app, cache, database, downstream calls
  5. Check saturation: CPU throttling, memory and GC pauses, connection pools, queue depth
  6. Check dependencies: slow database queries, DNS, third-party APIs
  7. Mitigate: roll back, scale out, or shed load, then find root cause

Compare against the same time last week to see if the spike is a pattern. Document what you tried so the timeline is ready for the postmortem.

Take quiz
What should you usually check first for a sudden spike?
The office printer
Recent deploys and configuration changes
The logo colour
Last year's budget
Which tool shows where time is spent across services?
A spreadsheet of salaries
An org chart
Distributed traces
A DNS registrar page

38. Why are percentiles better than averages for latency?

Averages hide the slow requests that users actually feel. Latency distributions have a long tail, so a few very slow requests barely move the mean.

Example: 99 requests take 100 ms and one takes 10 seconds. The average is about 199 ms, which looks fine, yet one user waited 10 seconds.

Percentile Meaning
p50 Typical user experience
p95 1 in 20 users is slower than this
p99 1 in 100 users is slower than this

High percentiles matter more in systems where one page makes many backend calls, because the chance of hitting at least one slow call grows with fan-out. Use histograms to calculate percentiles correctly. Averaging percentiles across servers gives wrong results.

Take quiz
p99 latency of 2 seconds means:
99% of requests took exactly 2 seconds
Average latency is 2 seconds
Only 1 server is slow
1% of requests took longer than 2 seconds
Why can averages mislead for latency?
A few very slow requests barely change the mean
They require more disk
They are always too high
They ignore all fast requests

39. How does progressive delivery reduce deployment risk?

Progressive delivery releases a change gradually and checks its health at each step, so a bad change affects few users and can be reversed fast.

It combines several techniques:

  • Canary releases that shift traffic in stages
  • Feature flags that turn code on or off without a redeploy
  • Ring deployments: internal users, then one region, then everyone
  • Automated analysis that compares canary metrics to baseline and rolls back on regression

Tools like Argo Rollouts and Flagger automate the traffic shifts and checks. The key benefit is a small blast radius: a bug found at 2% of traffic costs a fraction of an error budget compared with a full release.

Take quiz
Feature flags help by:
Encrypting the database
Turning code on or off without redeploying
Increasing build time
Replacing monitoring
The main benefit of progressive delivery is:
Zero need for tests
Slower recovery
A small blast radius for bad changes
More manual steps

40. How do you perform load testing before a launch?

Load testing proves the service meets its SLOs at the expected peak, and shows where it breaks first.

  1. Set goals: target requests per second and latency SLO
  2. Model realistic traffic from production logs, including the endpoint mix
  3. Use a production-like environment and data size
  4. Ramp load gradually and watch latency, errors, and saturation
  5. Run a stress test beyond peak to find the breaking point
  6. Run a soak test for hours to catch memory leaks
  7. Fix bottlenecks and repeat

Tools include k6, Locust, and Gatling.

// k6 example
export const options = { vus: 200, duration: '10m' };
export default function () { http.get('https://staging.example.com/api/items'); }

Plan for headroom, typically 2x expected peak, and tell dependent teams before testing.

Take quiz
What does a soak test reveal?
Colour contrast issues
Typos in the UI
Licence problems
Memory leaks and slow degradation over hours
Which tool is used for load testing?
k6
Photoshop
Excel macros only
Wireshark for CPU

41. How do you design a multi-region failover strategy?

First decide the recovery targets (RTO and RPO), as they drive cost and complexity. Then choose a pattern.

Pattern Description Trade-off Typical RTO
Active-passive (cold/warm) Standby region idle or small Slower failover, cheaper Minutes to hours
Active-passive (hot) Standby fully ready Fast failover, medium cost Minutes
Active-active All regions serve traffic Near-instant, highest cost and data complexity Seconds

Key design points:

  • Route traffic with health-checked DNS or a global load balancer
  • Replicate data, and decide between sync (no data loss, higher latency) and async (possible small loss)
  • Keep config and secrets available in every region
  • Avoid hidden single-region dependencies such as one auth service
  • Run failover drills regularly, because an untested plan usually fails
Take quiz
Which pattern gives the fastest failover but highest data complexity?
Cold standby
Active-active
Manual backup
Single region
Why run regular failover drills?
To increase latency
To remove DNS
Untested failover plans often fail when needed
To avoid replication

42. What is a Production Readiness Review?

A Production Readiness Review (PRR) is a checklist-driven assessment, usually led by SREs, that a service must pass before launching or before SRE agrees to support it.

It typically covers:

  • SLIs and SLOs defined, with dashboards and alerts
  • Capacity tested and scaling plan agreed
  • Failure handling: timeouts, retries, graceful degradation
  • Deployment: rollback tested, canary in place
  • Observability: logs, metrics, traces, runbooks
  • Security and backups: access controls and restore tested
  • On-call: rotation, escalation, and incident process

The review is a conversation, not a gate for its own sake. Gaps found become tracked actions, so the service launches with known risks instead of unknown ones.

Take quiz
Who commonly leads a Production Readiness Review?
The marketing team
The finance team
External auditors only
SREs working with the service developers
Which is checked in a PRR?
That rollback has been tested
The colour of the logo
The CEO's calendar
Office seating plans

43. How do you set RTO and RPO for a service?

RTO (Recovery Time Objective) is the maximum acceptable time a service can be down. RPO (Recovery Point Objective) is the maximum acceptable amount of data loss, measured in time.

If backups run every hour and the last good one is 50 minutes old when the system fails, RPO is up to 1 hour.

To set them:

  1. Ask the business what an hour of downtime or lost data costs
  2. Tier services by criticality (payments vs internal reports)
  3. Pick a recovery design that meets each tier
  4. Estimate cost, and revisit targets if cost is too high
  5. Test restores and failovers to measure real values
Target Typical method Cost
RPO near zero Synchronous replication High cost
RPO of minutes Async replication Medium cost
RPO of hours Periodic backups Low cost

Real values often exceed the stated ones until you test them.

Take quiz
RPO measures:
Maximum acceptable downtime
Maximum acceptable data loss in time
Number of servers
Monthly cost
Which approach gives RPO close to zero?
Weekly backups
Manual exports
Synchronous replication
Daily log rotation

44. What is the difference between horizontal and vertical scaling?

Vertical scaling (scale up) gives one machine more CPU, memory, or disk. Horizontal scaling (scale out) adds more machines and spreads load across them.

Vertical Horizontal
Simple, no code change Needs stateless design or sharding
Hard upper limit of the biggest machine Almost unlimited growth
Often needs a restart, single point of failure Improves availability, as one node can fail
Good for databases early on Good for web and API tiers

Reliability favours horizontal scaling, because redundancy comes with it. State is the main obstacle, so keep sessions in a shared store such as Redis, and use autoscaling on a metric like requests per pod or queue depth.

Take quiz
Which scaling approach improves availability by adding redundancy?
Vertical scaling only
Disabling replicas
Reducing nodes
Horizontal scaling
Horizontal scaling usually requires:
Stateless services or sharded state
A larger single machine
No load balancer
Removing all caches

45. How do you handle cascading failures?

A cascading failure starts with one component failing, shifts its load to others, and those then fail too. A typical case: one of five replicas dies, the other four get 25% more traffic, one overloads, and the rest follow.

To prevent and stop it:

  • Load shedding to drop excess work early
  • Timeouts and deadlines that propagate through the call chain
  • Circuit breakers to stop calling failing dependencies
  • Retry budgets and jittered backoff to avoid retry storms
  • Capacity headroom (N+2) so one failure does not overload the rest
  • Bulkheads that isolate resource pools between features

During an incident, reduce load first: block non-critical traffic, disable heavy features, and add capacity only after the load is controlled. Adding servers into an overloaded cluster can make them crash while still starting up.

Take quiz
What is the best first step when a cascade is underway?
Retry all requests faster
Reduce incoming load by shedding or disabling features
Restart every server at once
Remove all timeouts
Bulkheads help by:
Merging all services
Removing health checks
Isolating resource pools so failures stay contained
Increasing retries

46. Explain the internal working of Prometheus scraping and alerting?

Prometheus uses a pull model. It periodically fetches metrics over HTTP from targets that expose a /metrics endpoint.

flowchart LR
  A["Targets /metrics"] -->|scrape| B["Prometheus TSDB"]
  B --> C["Rule evaluation"]
  C -->|firing alerts| D[Alertmanager]
  D --> E["Slack, PagerDuty, email"]
  1. Service discovery finds targets, for example Kubernetes pods
  2. Every scrape_interval (often 15s) Prometheus scrapes each target
  3. Samples are stored in the local time series database, labelled by metric name and key-value labels
  4. Every evaluation_interval alerting rules written in PromQL are evaluated
  5. An alert becomes pending, then firing after the for: duration passes
  6. Firing alerts go to Alertmanager, which groups, deduplicates, silences, and routes them to receivers
- alert: HighErrorRate
  expr: sum(rate(http_requests_total{code=~"5.."}[5m])) / sum(rate(http_requests_total[5m])) > 0.02
  for: 10m

Take quiz
Which component groups and routes alerts to receivers?
Grafana panels
The scrape target
Node exporter
Alertmanager
What does the for: clause in an alerting rule do?
Requires the condition to hold for a duration before firing
Sets the scrape interval
Deletes old metrics
Encrypts the alert

47. What makes a postmortem action item effective?

An action item is only useful if it changes something. Vague items such as "be more careful" or "improve monitoring" never get done and never prevent a repeat.

An effective action item is:

  • Specific: names the exact change, such as adding a canary stage to the payment deploy
  • Owned: assigned to one person or team
  • Dated: has a due date
  • Tracked: lives in the issue tracker and is reviewed regularly
  • Prioritized: ranked by how much risk it removes
  • Systemic: fixes the process or tooling, not just the one mistake

Prefer actions that prevent the problem, then detect it faster, then mitigate it faster. Compare "add a guardrail that blocks the bad config" with "remind engineers to check the config". The first removes the risk, while the second depends on memory.

Take quiz
Which is the most effective action item?
Be more careful next time
Add an automated check that blocks invalid config, owner: Priya, due in 2 weeks
Improve things
Everyone should review more
Why should action items have an owner and due date?
To assign blame
To avoid writing postmortems
So they actually get done and tracked
To hide the cause

48. How do you calculate the composite availability of dependent services?

It depends on how services are connected: in series, where all must work, or in parallel, where any one is enough.

Serial dependencies: multiply the availabilities.

A = 99.9%, B = 99.9%, C = 99.9% (all required)
Total = 0.999 x 0.999 x 0.999 = 0.997 = 99.7%

Three nines multiplied give about 99.7%, which is around 2.2 hours of downtime per month. That is why a service's SLO cannot be better than its critical dependencies.

Parallel redundancy: take the chance that all fail.

Two replicas at 99% each
Total = 1 - (1 - 0.99) x (1 - 0.99) = 1 - 0.0001 = 99.99%

This assumes failures are independent. Shared causes, such as the same bad deploy or same region, break that assumption, so real numbers are lower.

Take quiz
Three serial dependencies at 99.9% each give roughly:
99.99%
99.9%
100%
99.7%
Parallel redundancy availability assumes:
Failures are independent
All nodes share one power supply
Only one node exists
Failures always happen together

49. Why use infrastructure as code for reliability?

Infrastructure as code (IaC) defines servers, networks, and permissions in version-controlled files, such as Terraform or CloudFormation, instead of manual console clicks.

The reliability benefits are practical:

  • Repeatability: the same code builds identical environments, which cuts configuration drift
  • Review: changes go through pull requests and automated checks
  • Fast recovery: a lost environment can be rebuilt from code
  • Audit trail: Git history shows who changed what and when
  • Safe rollback: revert the commit and re-apply
resource "aws_instance" "web" {
  ami           = var.ami_id
  instance_type = "t3.medium"
  count         = 3
}

Run terraform plan in CI so reviewers see exactly what will change before it is applied.

Take quiz
What does IaC reduce by building identical environments from code?
Code reviews
Configuration drift
Network cables
Test coverage
What does terraform plan show?
Billing invoices
A list of users
The changes that will be made before applying
Application logs

50. How do you troubleshoot a Kubernetes pod stuck in CrashLoopBackOff?

CrashLoopBackOff means a container keeps starting, crashing, and being restarted, with Kubernetes waiting longer between attempts, up to five minutes.

  1. Run kubectl describe pod <name> and read the Events and the last state, including exit code
  2. Run kubectl logs <name> --previous to see output from the crashed instance
  3. Check the exit code: 137 often means OOMKilled, 1 an application error, 127 a missing command
  4. Verify configuration: missing ConfigMap, Secret, or environment variable
  5. Check the liveness probe: too aggressive or wrong port can kill a healthy app
  6. Check resource limits: memory limit too low causes OOM kills
  7. Test the image locally to catch startup bugs
kubectl describe pod web-7d9f
kubectl logs web-7d9f --previous
kubectl get events --sort-by=.lastTimestamp

Fix the cause, not the symptom. Raising the restart delay only hides the crash.

Take quiz
Which command shows logs from the crashed container instance?
kubectl get nodes
kubectl cordon
kubectl version
kubectl logs --previous
Exit code 137 commonly indicates:
The container was killed for exceeding memory (OOMKilled)
A successful exit
A DNS failure
A missing git tag
«
»

Comments & Discussions