Who am I?@Drupal
@ricardoamaro
Portugal
Lisbon
Drupal Community
Family
+8 years Drupal
90’s Linux Adopter
5 years at Acquia
Site Reliability Engineer -Senior Tier2 Ops
https://drup
al.org/user/66
6176
About Acquia Metrics
○ Acquia Cloud:○ # of Instances (17,200+)○ # of Production Sites (54,000+) (incl. some biggest sites in the world)
○ # API Calls (3,000 + per sec)○ # of Availability Zones (20+)○ # of World Regions (8)
We will talk aboutA brief summary inspired on Google’s S.R.E. book
○ What is S.R.E?○ Tenets of S.R.E.○ Reliability & Toil○ Error budget - keeping the Service Level Objective (SLO)○ Development & Operations○ Monitoring and Being On-Call○ Postmortem culture - Learning from failure
What is S.R.E.?
➔ Term crafted by Google in 2003.
➔ When Ben Treynor was hired to run
“production” and ended up “applying
software engineering to an operations
function”
Site Reliability Engineering
➔ SRE is taken seriously by major companies
Site Reliability Engineering
Microsoft
Apple
Amazon
SREs are engineers that...
➔ Apply the principles of computer science and engineering to
design and develop large, distributed computing systems.
➔ Write software for those systems alongside product developers.
➔ Build all additional pieces those systems need, like backups and
load balancing.
➔ Reuse old solutions for new problems.
Site Reliability Engineering
“Reliability is the most fundamental feature of any product.”Ben Treynor, Google’s VP for 24/7 Operations
Site Reliability Engineering
DevOps & S.R.E.
DevOps is a practice, which was coined around 2008, that encompasses automation of manual tasks, continuous integration and continuous delivery. It applies to a wide audience of companies whereas SRE might be considered a subset of DevOps that possesses additional skill sets.
Source: https://en.wikipedia.org/wiki/Site_reliability_engineering
Tenets of S.R.E.
1. Ensuring a Durable Focus on Engineering2. Pursuing Maximum Change Velocity Without Violating SLOs3. Monitoring4. Emergency Response5. Change Management6. Demand Forecasting and Capacity Planning7. Provisioning8. Efficiency and Performance
Tenets of SRE
➔ Hire only coders➔ Have a Service Level Objective (SLO) for your service➔ Measure and report performance against SLOs➔ Use Error Budgets and gate launches on them➔ Have a Common staffing pool for SRE and DEV➔ Excess Ops work overflows to DEV team➔ Cap SRE operational load at 50% and share 5% with the DEV team➔ Oncall teams at least 8 people at one location or 6 on each, each product➔ Maximum of 2 events per oncall shift➔ Post mortem for every event➔ Post mortems are BLAMELESS and focus on process and technology, not people
How to achieve S.R.E.Treynor’s Action items
Reliability & Toil
The latest feature or
That the product works?
What is the most important Feature of a product?
How about the “503” feature ?
The most important thing is that the product works!
The 80’s Waterfall software delivery model
Operations @customer ➔ *Provisioning➔ *Installing➔ *Upgrading➔ *Maintaining➔ *Backups/Restore➔ *Scaling
Source: wikipedia
Then came the web...
● Software as a Service● Platform as a Service● Cloud computing ● ...
➔ Operations overhead not on the customer side➔ Features could now be delivered faster➔ Customer feedback important for product improvements
Product
DevelopmentShip Features
OperationsUsers
Opposite rewarding conflicts
Objectives:➔ Ship new features➔ Launch new products
Objectives:➔ Reliability & Availability➔ Customer success
Dev Ops
The problem: Toil"exhausting labour"
➔ Manual➔ Repetitive➔ Automatable➔ Tactical (Unplanned work)
➔ No enduring value➔ Scales linearly with service growth
(not just “work I don’t like to do.”)
An Old Solution to Toil
Caption goes here
● Scale with bodiesIn the old operations model, you throw people at a reliability problem and keep pushing (sometimes for a year or more) until the problem either goes away or blows up in your face.
As your business grows, workload trends to infinity
(x) time
● Cap Ops WorkloadAs your business grows, you need to reduce manual labor in order to continue delivering features. Put a 50% cap on Ops work and leave most of the SRE team time for writing code and reducing Toil.
(y) c
usto
mer
s/tr
affic
Workload/Toil over time
Google’s example➔ Keep operational work (i.e., toil) below 50% of each SREs time➔ More than 50% of each SREs time is spent on:
◆ engineering project work to reduce toil ◆ add service features - improving reliability, performance, utilization
➔ Improves career planning for the SRE➔ Improves morale on the organization
➔ An SRE team can easily devolve into an Ops team if the 50% target is broken.
Why less Toil is BetterS.R.E. - A modern solution
S.R.E. - A modern solutionDEV + OPS
➔ This conflict is not inevitable➔ The solution is: Error Budgets!➔ Everyone agrees on an Error Budget (has we will explain next)➔ SRE only prevents releases or Launches if the Error Budget is exceeded.
Dev Ops
Error budgets:keeping the SLOs
Example: A 99.9% availability SLO means that the service can be 0.1% unavailable, which is the error budget.
What is an Error Budget?
The business or the product establishes Service Level Objectives (SLOs) for the system, based on Service Level indicators such as error rate, availability or latency...
Error Budget
➔ 100% is the wrong reliability target for basically everything.➔ Set an SLO that acknowledges the trade-off and leaves an error budget➔ Error budget can be spent on anything: launching features, etc.➔ Error budget allows for discussion about how phased rollouts and 1%
experiments can maintain tolerable levels of errors.➔ Goal of SRE team isn’t “zero outages” – SRE and product devs are
incentive aligned to spend the error budget to get maximum feature
velocity.
➔ Out of Budget? No problems. Do more testing between releases.
How to obtain and use the Error Budget?
➔ This puts an incentive to developers that drives them to value stability (not just change).
➔ And gives control that drives SREs to permit change (not just stability).
➔ It forces decisions based on metrics, not politics- nor feelings, just data.
Error Budget A Self-regulating mechanism
Development & Operations
➔ Development and SRE teams share a
single staffing pool◆ If all is Reliable Devs are
rewarded with teammates
◆ If Ops is overloaded, SREs are
contracted to support code
How are Development & Operations teams organized?
Now tell me… Why should I hire you?
➔ SREs are developer/sys-admin hybrids
◆ They perform more Dev work as
things become stable
Development & Operations
Systems, code… Are you able to cook also?
➔ SRE can only spend up to 50% of their time on ops work
➔ If operational load exceeds 50%, the ops work overflows to Dev
➔ Allow them to move to other projects
Development & Operations
Monitoring and Being On-Call
➔ An engineer can only react with urgency a few
times a day before they get fatigued.
➔ Every page should be actionable.
➔ Every page response should require intelligence.
➔ Pages should be about a new problem or an
event that hasn’t been seen before.
Pager fatigueA serious a problem to be addressed
Root Cause Analysis: The Core of Problem
Solving and Corrective
by Duke Okes
https://www.amazon.com/Root-Cause-Analysis-Problem-Corrective/
dp/0873897641
Find and eliminate all root causes
A healthy monitoring and alerting pipeline is simple and easy to reason about
Monitoring Conclusion
Postmortem cultureLearning from failure
➔ Document written for ALL significant incidents ➔ Non-paged incidents are even more valuable - monitoring gaps➔ Explain what happened in detail ➔ Find all root causes of the event➔ Assign actions to correct the problem or improve how it is addressed next time
What are Postmortems?
➔ Use a blame free postmortem culture, with the goal of exposing faults◆ apply engineering to fix these faults, ◆ Try not just avoid or minimize them.
Postmortems Are Blameless!
SERIOUSLY: BLAMELESS!
The Field Guide to Understanding Human Error
by Sidney Dekker
https://www.amazon.com/Field-Guide-Understanding-Human-Error/dp/0754648265
The S.R.E. Google Book and more resources
● https://g.co/SREBook ● There is now #SRE on @hangops Slack.
https://t.co/btPgSGkGNz to join.