DevOps vs. SRE? 4 Important Differences
Tags: sre, devops
Published: 2019-11-05 16:46:51

<!-- wp:paragraph -->
<p>If you happen to know what <a href="https://www.scalyr.com/blog/site-reliability-engineer">SRE</a> is, you might be wondering how it relates to DevOps. Well, let's not beat around the bush. There's no "versus"—there's only a different approach for how to deliver better software faster. In this post, I'll break down each approach and show where DevOps and SRE differ. You'll notice that SRE has an opinionated approach for how to run production systems, whereas DevOps focuses more broadly on people, process, and tools—in that order of importance.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Let's start by setting the foundation for what DevOps and SRE are.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":3601,"align":"center"} -->
<div class="wp-block-image"><figure class="aligncenter"><img src="https://library.scalyr.com/2019/04/05074622/Devops_vs_SRE.png" alt="DevOps vs SRE" class="wp-image-3601"/></figure></div>
<!-- /wp:image -->

<!-- wp:more -->
<!--more-->
<!-- /wp:more -->

<!-- wp:heading -->
<h2>What's DevOps?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>I'm not going to spend too much time on definitions, but I'll use them throughout the post to remark on the differences between DevOps and SRE. Of the many definitions of DevOps, I prefer this one from <a href="https://www.skytap.com/blog/gene-kim-on-the-need-for-automated-environment-creation/">Gene Kim</a>:</p>
<!-- /wp:paragraph -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>DevOps is [the] set of <strong>cultural norms</strong> and <strong>technology practices</strong> that [enables] the fast flow of planned work from, among others, development, through tests into operations while preserving world-class reliability, operation and security. <strong>DevOps isn't about what you do, but what your outcomes are.</strong></p></blockquote>
<!-- /wp:quote -->

<!-- wp:paragraph -->
<p>So DevOps is mainly a cultural shift inside the organization, not a group, person, or position. What's essential in DevOps are the outcomes at the finish line. The "what" and "how" of it all isn't important. That's why the DevOps model <a href="https://whatis.techtarget.com/definition/CALMS">CALMS</a> outlines a set of principles that every DevOps initiative should consider using, and it starts with culture.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Now, let's continue with SRE.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>What's SRE?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>SRE stands for "site reliability engineering," a term coined by Google. A few years ago, Google engineers wrote a <a href="https://landing.google.com/sre/sre-book/toc/index.html">book</a> to explain how they run and operate their systems in production. Then, they wrote a second <a href="https://landing.google.com/sre/workbook/toc/">book</a> on practical ways to implement SRE. Both books are now <a href="https://landing.google.com/sre/books/">available for free</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Google's definition of SRE is quite simple:</p>
<!-- /wp:paragraph -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>SRE is what happens when you ask a software engineer to design an operations team.</p></blockquote>
<!-- /wp:quote -->

<!-- wp:paragraph -->
<p>Therefore, SREs are operations folks with strong development backgrounds, and they apply engineering practices to solve common problems when running systems in production. SREs are responsible for making systems available, resilient, efficient, and compliant with the organization's policies (like change management).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Now, let's get into the details of where SRE differs from DevOps.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Removing Silos in the Organization</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The DevOps movement was initiated to eliminate the silo between developers and operators. Developers want to deploy the features they just coded as soon as possible. Operations folks would like to slow down doing deployments to maintain available systems. How does DevOps solve this problem? Besides the CALMS framework, there are also principles from <a href="https://itrevolution.com/the-three-ways-principles-underpinning-devops/">the three ways of DevOps</a>, which aim to <strong>break down the silos between developers and operators</strong>. <a href="https://www.amazon.com/DevOps-Handbook-World-Class-Reliability-Organizations/dp/1942788002">The DevOps Handbook</a> best explains these three ways of DevOps and gives you a few ideas to apply.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":3604,"align":"right"} -->
<div class="wp-block-image"><figure class="alignright"><img src="https://library.scalyr.com/2019/04/05075206/The-DevOps-movement-was-initiated-to-eliminate-the-silo-between-developers-and-operators.png" alt="The DevOps movement was initiated to eliminate the silo between developers and operators" class="wp-image-3604"/></figure></div>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>SRE also removes silos. The difference is that instead of only finding ways to optimize flow between teams, SREs get their hands dirty. Being where the action is gives SREs better context for supporting systems in production. SREs integrate into the team as consultants, helping developers create more reliable systems. What's most important here is that <strong>SREs share ownership</strong> of running systems in production with developers.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Measuring a Successful Implementation</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>DevOps metrics focus mainly on how quickly and frequently deployments are happening and how often they go wrong. In other words, according to the <a href="https://puppet.com/resources/whitepaper/2017-state-of-devops-report">2017 report from Puppet and DORA</a> (DevOps Research and Assessment), the key metrics in DevOps are the number of deployments, the lead time from code commit to releasing, the number of deployments failed, and how much time it takes to recover from failure. Feedback loops help DevOps continuously improve the quality of systems, and they open the door to experimentation.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>SRE also depends on metrics to improve systems, but from the reliability perspective. The foundations for SREs are the <a href="https://cloud.google.com/blog/products/gcp/sre-fundamentals-slis-slas-and-slos">service-level objective (SLO), service-level indicator (SLI), and service-level agreement (SLA)</a>. Each of these metrics will show how reliable the system is. SREs use these metrics to determine if a release for a change in the system will go to production or not. In SRE, speed and quality are products of reliable systems, and SREs focus on those types of metrics.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Pursuing CI/CD Practices</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>DevOps is a huge advocate for automation; I'd say that after culture, automation is the second most crucial aspect. In DevOps, the message is to automate as much as possible and make the releases boring. Many activities happen after a developer commits the code, and most of these activities can—and should—be automated. For example, you can automate leveraging the application's build process after integrating everybody's work in code to a machine. Or you can automate the process of deploying application changes, which is—or should be—the same every time. DevOps pursues CI/CD to increase the velocity and quality of the systems.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>SRE pursues CI/CD for a different reason: to reduce the cost of failure. For SREs, all the tedious and repetitive tasks that are common in operations—like deployments, application restarts, or backups—aren't appealing. For that reason, SREs reserve a certain amount of time (for example, Google reserves 50%) for reducing the operational work or toil. SRE uses the same practices from DevOps, such as canary releases, blue/green deployments, and infrastructure as code. But SRE does so with the purpose of doing other more appealing things, like evolving the architecture or implementing new technologies.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Accepting Failures</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>DevOps fosters a blameless culture because every time something goes wrong, it's a learning opportunity. Accepting that failures will continue to happen is the first step. Instead of putting too much effort into making systems completely fault-tolerant, a DevOps culture finds ways to tolerate fault. Netflix is the most prominent advocate of this culture, with its <a href="https://medium.com/netflix-techblog/the-netflix-simian-army-16e57fbab116">Simian Army.</a> Netflix is continuously bringing part of its system down so that it's just regular business when a real fault comes. If a set of servers goes down in a zone, Netflix automates the process of recreating servers in a different zone. And they practice it in a production environment all the time.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":3605,"align":"right","width":255,"height":251} -->
<div class="wp-block-image"><figure class="alignright is-resized"><img src="https://library.scalyr.com/2019/04/05075443/Netflix-is-continuously-bringing-part-of-its-system-down-so-that-its-just-regular-business-when-a-real-fault-comes.png" alt="Netflix is continuously bringing part of its system down so that it's just regular business when a real fault comes" class="wp-image-3605" width="255" height="251"/></figure></div>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>SRE practices blameless postmortem every time a failure in the system happens. The idea of blameless postmortems is to identify what caused the fault, then find ways to avoid having the same failure happen again in the same way. SRE also accepts failures, but they put numbers to it—they call it the <a href="https://landing.google.com/sre/sre-book/chapters/embracing-risk/">error budget</a>. After defining the SLI, SLO, and SLA, SRE determines how much failure is acceptable (the budget), because it's expensive to be 100% available. And in some cases, it's not possible.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Therefore, SREs determine how long it would be acceptable for the system to be down. For example, say the site can be down for about 43 minutes every month, which means the uptime is 99.9%. If the system has been down more than the allowed budget that month, releases are paused until the next month.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>DevOps and SRE Don't Compete With Each Other</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>I very much like the way Google relates SRE with DevOps by using the following phrase:</p>
<!-- /wp:paragraph -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>class SRE implements interface DevOps</p></blockquote>
<!-- /wp:quote -->

<!-- wp:paragraph -->
<p>SRE and DevOps don't compete with each other. SRE is the name Google chose to define the way they do DevOps before the term DevOps was coined. There are slight differences, but as it happens when a class implements an abstract class, the implementation might choose to overwrite or extend the base functionality.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>I'd say the main difference is that DevOps is a culture that broadly defines a way of doing things. Maybe that's why there are too many definitions of DevOps and many case studies from companies of different sizes and industries. By contrast, SRE has an opinionated way of doing things, but that's because it was born when Google published their explanation of how they run systems in production.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>My two cents? Study each movement, and pick the practices and principles that work for your organization today. Tomorrow? Well, tomorrow things will change, and you might need to adopt new principles from DevOps and SRE.</p>