123DevOps··5 min read

What is SRE (Site Reliability Engineering)?

Learn what SRE is, where it came from, what SLIs, SLOs, SLAs, and error budgets are, what the day-to-day work looks like, and how to start learning.

Beginner

You open your banking app and it won’t load. You try again, and nothing. For you, it’s just annoying. For the company, it means lost customers and shaken trust. On the other side, there is an entire field dedicated to keeping that from happening and fixing it fast when it does: SRE.

What is SRE

SRE stands for Site Reliability Engineering. “Reliability” here means: the system works when people need it.

The practice was created at Google in the early 2000s, and Ben Treynor Sloss is credited as its founder. The core idea is simple and powerful: treat operations as a software problem. Instead of people restarting servers by hand, engineers write code to automate, measure, and improve operations.

“SRE implements DevOps”

If you’ve already read about DevOps, you may be wondering what the difference is. Google itself uses a programming comparison: class SRE implements interface DevOps. In other words: DevOps defines what to do (collaborate, automate, measure, ship in small steps), like an “interface.” SRE is one concrete way of doing it, with well-defined rules and numbers.

The core concepts

SLI, SLO, and SLA

Think of a pizzeria that promises fast delivery:

Acronym Meaning At the pizzeria On a website
SLI Service level indicator: what you measure The time of each delivery % of requests answered successfully
SLO Service level objective: the internal target 99% of deliveries within 40 minutes 99.9% success over 30 days
SLA Service level agreement: the promise with consequences Late? The pizza is free Below 99.5%, the customer gets a credit

The SLO is usually stricter than the SLA, so the team notices a problem before breaking the promise to the customer. To dig deeper, see SLOs that make business sense.

Error budget

No system is 100% reliable, and trying to get there costs far too much. If the SLO is 99.9%, the remaining 0.1% is the error budget: the amount of failure you are allowed. Over 30 days, that comes to about 43 minutes. You can do the math yourself in the terminal:

# minutes in 30 days × 0.1% allowed failure
echo "30 * 24 * 60 * 0.001" | bc
# result: 43.200 (about 43 minutes)

While there is budget left, the team can ship new features with confidence. Once the budget is gone, the priority shifts to stability. It is an objective agreement between speed and reliability. More on this in SLO and error budget culture.

Other essential concepts

  • Toil: manual, repetitive, automatable tasks that bring no lasting value, like restarting the same service every week. Google recommends that toil take up less than half of an SRE’s time. See toil automation.
  • On-call: a rotation in which someone stays available to respond to alerts outside business hours.
  • Incident response: an agreed-upon process for when something breaks: who coordinates, who investigates, who communicates.
  • Blameless postmortem: after the incident, the team writes down what happened and what will change, focusing on process failures, not on blaming people. Read about blameless postmortems.
  • Alerting on symptoms: alert when the user feels the problem (slow site, errors), not on every internal detail, like high CPU usage. Google’s “four golden signals” help: latency, traffic, errors, and saturation.
  • Capacity planning: predicting how many resources (servers, memory, bandwidth) you will need before you run out.
  • Automation: SRE’s preferred answer to almost every problem that keeps coming back.

An SRE’s day to day

An SRE usually defines and tracks SLOs, builds dashboards and alerts, takes part in the on-call rotation, coordinates incidents, writes postmortems and, above all, writes code to eliminate manual work and make the system more resilient.

The most sought-after skills are: Linux, networking (DNS, HTTP, TCP), programming (Python or Go are common), a grasp of distributed systems (systems spread across many machines that need to work together), and observability (logs, metrics, and traces).

SRE, DevOps, and Platform Engineering

Aspect DevOps SRE Platform Engineering
What it is A culture and set of practices A concrete implementation of DevOps A discipline that builds internal platforms
Main focus Shipping software fast and safely Reliability measured with SLOs Developer experience
Typical question “How do we deliver better together?” “Is the system reliable enough?” “How do we make developers’ lives easier?”

How to start learning

  1. Read Google’s free books, available online at sre.google. The first one, Site Reliability Engineering, is the classic starting point.
  2. Practice with a small project. Put up a simple website, pick an SLI (for example, the percentage of successful responses), and define an SLO.
  3. Actually measure it. A very simple first step is checking a page’s response code and time:
curl -s -o /dev/null -w "status: %{http_code}  time: %{time_total}s\n" https://example.com

Try it yourself

  • Explain in your own words the difference between SLI, SLO, and SLA
  • Calculate the error budget for a 99% SLO over 30 days
  • Run the curl command above against a site you use and write down the time
  • List three repetitive tasks in your day that could be automated
  • Read the first chapter of Google’s SRE book at sre.google
  • Write a blameless “mini postmortem” about a problem you’ve lived through

Next steps

Reliability isn’t never failing: it’s failing rarely, noticing fast, and always learning.

Get updates on new posts and stay in the loop!