Site Reliability Engineering (SRE) is an engineering discipline with the main goal of improving the reliability of software services. Initially developed by Google, SRE is now an industry standard, practiced in companies of all sizes. The increasing adoption of SRE best practices shows the effectiveness of this methodology in ensuring consistent uptime and availability, improving risk management and enabling early detection of issues.
While SRE is often leveraged by DevOps teams, the terms are neither identical nor interchangeable. This article provides an in-depth overview of SRE as a methodology and SRE practices, as well as a brief SRE and DevOps comparison.
In this article, you will learn:
- What is SRE
- Why we need SRE
- SRE vs DevOps
- SRE best practices
What Is SRE?
SRE was initially developed by Google and later detailed in a guide they wrote and made public. The guide outlines how Google applies an SRE strategy and suggests a methodological blueprint for other organizations. However, at the present, SRE strategies vary widely by organization and practices, which is why site reliability engineer roles may differ according to company size and industry. A similar discipline was developed in parallel by Facebook, called Production Engineering. Currently, both disciplines seem to have merged to form a single approach.
Why Do We Need SRE?
Historically, the goal of ensuring software reliability was met in different ways, primarily under the responsibility of Software Architects, DevOps and old-school Operations engineers. But there are significant advantages dedicated site reliability engineers can bring to the table:
- Consistent uptime and availability—through collaboration between engineers, customers, and product owners, site reliability engineers define and protect uptime and availability targets. They use the concept of “error budgets”, to better balance feature development and availability. These budgets normalize less than 100 availability, creating more realistic targets for team deliverables.
- Measurement framework for reliability—reliability engineers define service level indicators (SLIs) and service level objectives (SLOs) to maintain consistent operations. Teams can monitor these agreed SLIs to understand if they are meeting reliability objectives. Defining proper SLIs that have direct impact on the goals of the service is an important engineering task.
- Increased automation—one of the main practices of SRE is to eliminate tedious tasks related to production operations, particularly maintenance tasks. This frees engineers to evaluate systems and focus on refining architecture and operations.
- Comprehensive understanding—site reliability engineers are encouraged to develop a holistic understanding of operations, components, and systems, and how these aspects combine. This grants greater ability to weigh implications and impacts of changes.
- Earlier issue detection—engineers are continuously searching for limitations in operations and ways to improve configurations. This enables them to identify potential problems earlier and hopefully address those issues before they impact your systems.
SRE vs DevOps
Site reliability engineering is often been misperceived as an evolution of DevOps. In reality, it is a practical implementation of DevOps principles. Just as continuous integration and continuous delivery are applications of DevOps principles to software release, SRE is an application of these same principles to software reliability.
According to Google’s approach, you can use SRE to better adopt DevOps principles in the organization and measure the success of your implementation.
To better understand how to combine the two, consider the following principles:
- Reducing organizational silos – a shared sense of responsibility to eliminate the passing of problems between teams. This is one of the main principles of a DevOps philosophy. When SREs focus on improving the detection of issues and the performance of applications, operations teams can focus on managing infrastructure and developers can focus on feature improvements.
- Accepting failure as normal – accountability and the acceptance of failure is significant for improving operations and addressing issues quickly. When the possibility of failure is normalized, teams can take bigger risks which potentially lead to greater innovations without fear of excessive setbacks or downtime. Additionally, normalization helps ensure that post mortems are objective and that you can derive meaningful improvement goals.
- Implementing gradual change – both SRE and DevOps encourage continuous improvement through small, frequent changes. This method minimizes any potential negative impacts of change and limits risk. SRE leverages metrics in combination with change management strategies to ensure that products and operations continually improve.
- Leveraging tooling and automation – SRE requires the standardization of technologies and tools within a team or business unit. This makes it easier to manage operations and reduces the chance of issues created by technological incompatibilities. This standardization also helps ensure that members across a team are able to better collaborate since tooling is uniform and is less likely to require specialized skill sets that some members lack.
- Measuring everything – SRE combines metrics with feedback loops to measure operations and identify opportunities for improvement. It also builds in slack for risk and manual operations as needed, which are made more predictable through measurement. By applying metrics data, teams can set appropriate targets while maintaining reasonable expectations of performance.
5 Site Reliability Engineering Best Practices
When implementing SRE, it may take you some time to refine your strategy and customize practices to meet your operational needs. To help speed up this process, consider adopting the following SRE principles and best practices.
1. Analyze changes holistically
Teams should work to evaluate all changes with the understanding of how that change may impact other systems or processes. This means understanding any dependencies on that change and how those dependencies may chain throughout your operations.
Additionally, teams should evaluate both short term and long term impacts. If a change causes short team performance losses but long term gains, your engineers need to weigh this value accordingly.
2. Expand skill sets
Successful SRE implementations depend on highly and diversely skilled engineers and architects. Additionally, because environments and operations are dynamic, you need engineers who are constantly expanding their skillsets and expertise.
This requirement means, encouraging training and professional development. It also means that you may want to consider less traditional backgrounds in your team makeups to include hard to access expertise.
3. Do everything to eliminate manual tasks
Implement automation early on and build from a stance that supports future automation. For example, developing basic infrastructure templates from the start that can be modified as needed. Your goal should be to reduce duplication or redundancy of work as much as possible. While this requires extra work upfront, it can save significant effort and time later on.
4. Learn from failures
Embrace postmortems as opportunities for learning and insight. When your teams are able to discuss and review incidents without blame, they are better able to identify issues objectively and identify areas of lacking knowledge or skill. In turn, this helps teams identify gaps that need to be addressed to improve overall performance and quality.
5. Define service-level objectives like an end user
To ensure high quality service, you need to understand what your users want and need. One way to do this is to focus on defining SLOs from the perspective of the end user. For example, focusing on request latency on the client side rather than the server side. By focusing on client perspectives you reduce the chance that your improvement efforts will go unappreciated or unseen.