(English) SRE Fundamentals
(English) SRE Fundamentals
TAM Webinar
SEP 2022
Proprietary + Confidential
Let’s go
2 Agenda
4 Q&A
Purpose
& Target
SRE Fundamentals
The objective of this TAM Webinar is to share Site Reliability Engineering (SRE) knowledge
with Google Cloud Community.
In this webinar you will learn the principles and practices that allow your systems to be
more scalable, reliable and efficient - these lessons can be directly applied to you
company.
Agenda
SRE Fundamentals Agenda
14:00 ~ 14:05 { Opening }
XX
14:00 (BRT)
Pamella
Canova
Technical Account Manager
Introduction to SRE
Pamella Canova
Technical Account Manager
Topics
Site reliability engineering (SRE) is a set of principles and practices that incorporates
aspects of software engineering and applies them to infrastructure and operations
problems. The main goals are to create scalable and highly reliable software systems.
Site reliability engineering (SRE) was born at Google in 2003, prior to the DevOps
movement, when the first team of software engineers led by Ben Treynor Sloss, was
tasked to make Google’s already large-scale sites more reliable, efficient, and scalable.
The practices they developed responded so well to Google’s needs that other big tech
companies, also adopted them and brought new practices to the table.
Software's
long-term
cost
Software engineering as a
discipline focuses on designing
and building rather than operating
and maintaining, despite estimates
that 40%1 to 90%2 of the total
costs are incurred after launch.
1
Glass, R. (2002). Facts and Fallacies of Software
Engineering, Addison-Wesley Professional; p. 115.
2
Dehaghani, S. M. H., & Hajrahimi, N. (2013). Which Factors
Affect Software Projects Maintenance Cost More? Acta
Informatica Medica, 21(1), 63–66.
http://doi.org/10.5455/AIM.2012.21.63-66
Developers Operators
Agility Stability
Reducing product lifecycle friction
Agile DevOps
solves this solves this
interface DevOps
DevOps 5 key areas
is a set of practices, guidelines 1. Reduce organizational silos
and culture designed to break 2. Accept failure as normal
down silos in IT development, 3. Implement gradual changes
operations, architecture, 4. Leverage tooling and automation
networking and security.
5. Measure everything
The SRE approach
to operations
Use data to guide decision-making.
Treat operations like a software
engineering problem:
● Hire people motivated and capable
to write automation.
● Use software to accomplish tasks
normally done by sysadmins.
● Design more reliable and operable
service architectures from the start.
What do SRE teams do?
Site Reliability Engineers develop SRE is a job function, a mindset, and
solutions to design, build, and run a set of engineering approaches to
large-scale systems scalably, running better production systems.
reliably, and efficiently.
We approach our work with a spirit of
We guide system architecture constructive pessimism: we hope for
by operating at the intersection the best, but plan for the worst.
of software development and
systems engineering.
class SRE implements DevOps
DevOps 5 key areas
is a set of practices, guidelines and 1. Reduce organizational silos
culture designed to break down silos in
2. Accept failure as normal
IT development, operations, architecture,
networking and security. 3. Implement gradual changes
4. Leverage tooling and automation
Site Reliability Engineering 5. Measure everything
is a set of practices we've found to work,
some beliefs that animate those
practices, and a job role.
Error Budgets
The key principle of SRE
2
How to measure reliability
Naive approach: Relatively easy to measure for a continuous
good time binary metric e.g. machine uptime
Availability =
total time
= which fraction of time
the service is available and working
Much harder for distributed request/response services
– Is a server that currently does not get requests up or down?
Intuitive for humans – If 1 of 3 servers are down, is the service up or down?
How to measure reliability
More sophisticated approach: Handles distributed request/response services
good interactions well
Availability =
total interactions
= which fraction of real users for whom
the service is available and working
Enables these cases:
– Is a server that currently does not get requests up or down?
– If 1 of 3 servers are down, is the service up or down?
Allowed unreliability window
Reliability
level
per year per quarter per 30 days
Source: https://landing.google.com/sre/sre-book/chapters/availability-table/
Allowed unreliability window
Reliability
level
per year per quarter per 30 days
99.5% 1.83 days 10.8 hours 3.6 hours 100% 21.6 minutes
99.9% 8.76 hours 2.16 hours 43.2 minutes 10% 3.6 hours
99.999% 5.26 minutes 1.30 minutes 25.9 seconds <0.05% all month
Source: https://landing.google.com/sre/sre-book/chapters/availability-table/
“
100% is the wrong reliability
target for basically everything.”
Benjamin Treynor Sloss, Vice President of 24x7 Engineering, Google
Error budgets
● Product management & SRE define an
availability target.
Dev team can manage the risk themselves Shared responsibility for system uptime
They decide how to spend their error budget Infrastructure failures eat into the devs’ error budget
of terms
service level service level service level
indicator: a objective: a top-line agreement:
well-defined target for fraction consequences
measure of of successful
'successful enough' interactions • SLA = (SLO + margin)
+ consequences = SLI
• used to specify • specifies goals + goal + consequences
SLO/SLA (SLI + goal)
• Func(metric) <
threshold
SLO definition and measurement
Service-level objective (SLO): a target for SLIs Choosing an appropriate SLO is complex.
aggregated over time Try to keep it simple, avoid absolutes,
perfection can wait.
● Measured using an SLI (service-level indicator)
● Typically, sum(SLI met) / window >= target Why?
percentage ● Sets priorities and constraints
for SRE and dev work
● Sets user expectations about
Try to exceed SLO target, but not by much
level of service
Product lifecycle
Business Process
Used with permission of the image owner Jennifer Petoff, Sidewalk Safari Blog
Postmortem philosophy
The primary goals of writing a postmortem Postmortems are expected after
are to ensure that: any significant undesirable event
Why? What?
Because: Work directly tied to running a service that is:
• O(n) with service growth (grows with user count or service size)
Team skills
Hire good software engineers (SWE)
and good systems engineers (SE).
Not necessarily all in one person.
Try to get a 50:50 mix of SWE
and SE skillsets on team
Everyone should be able to code.
SE != "ops work"
For more detail, see “Hiring Site Reliability Engineers,” by Chris Jones,
Todd Underwood, and Shylaja Nukala, ;login:, June 2015
Empowering SREs
● SREs must be empowered to enforce the
error budget and toil budget.
four things. 2.
budget. They defend the SLO.
Hire people who write software.
They'll quickly become bored by performing
tasks by hand and replace manual work.
3. Ensure parity of respect with rest of the
development/engineering organization.
4. Provide a feedback loop for self-regulation.
SRE teams choose their work.
SREs must be able to shed work or reduce
SLOs when overloaded.
You can do ●
●
Pick one service to run according to SRE model
Empower the team with strong executive
this. ●
sponsorship and support
Culture and psychological safety is critical.
● Measure Service Level Objectives & team health.
● Incremental progress frees time for more
progress.
Spread the ● Spread the techniques and knowledge once you
have a solid case study within your company
Foundational
Cloud knowledge and working
in the cloud
Professional
Recommended 3+ years
industry experience & 1 year
Cloud Associate Professional Professional Professional hands-on experience
Digital Cloud Cloud Cloud Network Cloud Security with GCP
Leader Engineer Developer Engineer Engineer
Questions?
Thank you