Managing Reliability With SLOs and Error Budgets

Renu Bhaskaran - Mar 7 '22 - - Dev Community

As businesses adopt a digital-first mindset, it is critical to build reliable services without sacrificing innovation speed. The “want it now” customer culture is the new normal, and it forces companies to set unrealistic shipping expectations. Both you and your customers must be on the same page about system performance. Making sure that you don’t overachieve the promised targets is the first step toward propagating a culture of building products with acceptable end-user experience at an affordable budget.

As per SREs, availability is directly proportional to product success. Therefore, you must measure its availability using three service-level metrics, which will be discussed in detail in the following sections:

  • Service-Level Indicator (SLI)
  • Service-Level Objective (SLO)
  • Service-Level Agreement (SLA)

Manage SLOs

As developers ship new features and enhance existing ones, unknown factors might cause chaos in your system. However, this shouldn’t hamper your innovation quality and velocity. Enter error budgeting, which acts as a performance indicator and directs development efforts. Ben Treynor Sloss, Google’s VP of engineering who coined the term SRE, summarizes SRE as “What happens when you ask a software engineer to design an operation function.”

Let’s look at how each of these will help your organization race forward.

Error Budgets, SLOs, SLIs

What Are SLOs?

A Service Level Objective (SLO) is a reliability target that we set to define how much availability we expect out of a service. In other words, SLO is a target measure of how reliable a service is expected to be. It helps you determine the downtime level that’s acceptable for your service. But to understand what an SLO is, one must know what an SLI is.

SLI, or Service Level Indicator, is a metric that provides insights about the health of a service. It also indicates if SLOs are met. SLOs play a crucial role in shaping reliability goals that SREs must meet. They help ‌SREs measure their success when accomplishing those goals by figuring out what and how to measure. Furthermore, Service Level Agreements (SLAs) are legal agreements that explain the implications if the service fails to meet its SLO.

As digital dominance increases, the expectations to build more resilient and reliable services increase. Customers have become accustomed to highly-available applications that are constantly functional and consumable. Eventually, balancing service reliability and availability becomes a challenge for companies.

100% reliability is an impossible objective that you might feel tempted to set. It’d simply mean that you choose not to make any changes in production, which is definitely not a wise business decision. Perfection isn’t the goal, but setting measurable and concrete reliability targets will result in happy customers. Finding this balance is the center of offering compelling software experiences and simultaneously focusing on an organization’s survival.

Well thought-out SLOs are realistically achievable reliability targets, or they can be summarized as a reasonable approximation of user experiences. Defining an SLO involves inputs from multiple stakeholders and various teams, and it is a collaborative process driven by the SRE team. Then, SLOs act as the principal decision-making driver, which lets you discover the right balance between velocity and quality. Breaching the SLO has well-documented commercial implications that ultimately put more pressure on engineering efforts.

What Is an Error Budget?

An error budget is essentially an allowance for downtime that can accumulate over a certain timeframe for your service. It is the acceptable limit of unreliability before your customers are impacted. Failures are inevitable when you constantly change and improve your systems. Pursuing perfection without leaving room for failure results in SLA violations and hefty consequences. Therefore, normalizing failure as a part of the process helps teams further innovate and take risks.

To improve the reliability and performance of your service, you must be capable of making important decisions, such as when and how much teams should prioritize development work.

An error budget is a tool that helps teams take calculated risks and avoid obsessing over reliability. This tool helps the SRE and development teams to work in tandem, as well as control ‌release velocity by making sure that SLOs are met. Plenty of error budget remaining indicates that developers can appropriately manage risk. Once the error budget is exhausted, teams slow down the shipping frequency and focus on testing. Keeping a tab on the remaining error budget helps you determine the deployment rate.

How Do SLOs and Error Budgets Help Manage Reliability?

The obvious decisions start when you don’t meet your SLO and exhaust the error budget. The most common path includes stopping feature launches until the service is within SLO again, or working on reliability-related bugs. Reviewing SLO and error budget on a periodic basis makes sure that you’re meeting expectations and reliability requirements. Error budgets act as a trigger to help minimize the operational overhead of the service, and enable teams to make prudent decisions.

According to the Google SRE book’s appendix:

           Error Budget = 1 – Availability SLO
Enter fullscreen mode Exit fullscreen mode

For example, if the SLO is 99.9%, then to calculate the error budget:

           Error Budget = 1 – 99.9% = 0.1%
Enter fullscreen mode Exit fullscreen mode

This 0.1% is the unavailability window. On exhausting the error budget, previously agreed-upon policies help prevent any further customer impact. New releases are kept on hold while the team performs more testing. Having a healthy and mature SLO and error budget culture lets you refine how you measure and discuss the reliability requirements of your service.

SLA, SLO, SLI

Conclusion

In a distributed environment, offering 100% availability is technically complex and costly. Establishing SLOs and creating an error budget is a long journey, but the results are well worth the investment. You will become equipped with the needed ammunition to detect potential customer impacting issues even before they become customer facing. You must continually monitor key paths within your service that are frequently visited by your users. Aggregating this data helps define alerts and other actions in the event of a breach or near breach.

Speaking of aggregating data, have you thought about dashboarding yet? We recently introduced Harness Dashboards and would love if you took a peek at them!

The post Managing Reliability With SLOs and Error Budgets appeared first on Harness.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .