SRE Revisited: SLO in the Age of Microservices
February 16, 2022

Dotan Horovits
Logz.io

Share this

Site Reliability Engineering (SRE) practice was established by Google nearly 20 years ago and was popularized with Google's monumental SRE Book. Everyone's been attempting to follow that iconic path ever since.

What Are SLI, SLO and SLA Anyway?

SRE practice revolves around the concepts of SLO, SLI, SLA, and the related "error budget." The Google SRE Book, which laid the foundations for the practice, defines them as follows:

Service Level Indicator (SLI) is a carefully defined quantitative measure of some aspect of the level of service that is provided. Common examples include latency, error rate, request throughput and availability.

Service Level Objective (SLO) is a target value or range of values for a service level that is measured by an SLI. For example, an SLO can state that the average latency per request should be under 120 milliseconds. Many companies set SLO targets as a number of nines, for example "five nines" uptime means 99.999% uptime, which means a maximum of 5.26 minutes downtime per year.

Service Level Agreement (SLA) is an explicit or implicit contract with your users that includes consequences of meeting (or missing) the SLOs they contain. Put simply, if you've got a penalty attached to breaching an SLO — you're talking SLA.

SRE typically doesn't deal with SLA directly, as it's more commercial in nature. Rather, the SRE is concerned with meeting the SLOs that underlie the SLA.

Error budget is an important related concept, which determines the rate at which the SLOs can be missed. Error budget is an important indicator for meeting the SLO goals consistently, and SRE teams track it weekly and even daily. Error budget is also important, as it enables downtime windows that can be used for maintenance, experimenting with new features, and other innovation.

So How Is SRE Changing in the Age of Microservices?

The SRE concepts remain valid these days as they've been before. But then again, their system of reference has drastically changed.

SLOs have traditionally referred to assets such as the application's binary or other deployment artifacts. That made perfect sense when the binary encapsulated the entire application, or a major piece of it such as the business logic tier.

In the world of microservices, however, the deployed artifacts are, well — microservices. And as the name suggests, each individual micro-service executes only a tiny piece of functionality.
In such systems it makes little sense to track SLO on the individual artifacts. SLO should refer to the functionality that is meaningful to the users.

Therefore, the practice of monitoring SLO on the service binary is no longer relevant.

In microservice architecture, rather than the individual service, it is the mesh of services that needs to play well together to execute. In these systems, tens and even hundreds of services may be traversed in order to satisfy a single user request. In these systems, rather than monitoring individual services, SLI and SLO should be defined for flows and user journeys.

The complex request flows brought about the rise of Distributed Tracing discipline. It enables tracing a single request through the call chain between the different interacting microservices, by propagating context along the request path. It's typically used to pinpoint where failures occur and what causes poor performance. However, tracing can also be used to trace FinOps and business workflows.

Google Dapper is in fact one of the forefathers of modern distributed tracing, which served as inspiration for tools such as Jaeger and Zipkin. According to Ramón Medrano Llamas, a staff site reliability engineer at Google who leads the SRE team in charge of Google's identity services, "it's the closest tool we have right now for a definite observability tool."

To make things more interesting, these user journeys not only span several services, but may actually involve a few requests. Let's look for an example at the Google sign-in process: as Ramón from Google shares, what used to be a matter of three calls in the pre-microservices era, is today a full business flow, consisting of multiple steps: loading page, then putting username & password, then second factor auth. and so on. Each individual step is a request, triggering a chain of microservices to satisfy. And the overall multi-step flow isn't stateful, it depends on the end user to carry it over from step to step. Monitoring these business flows is less trivial, but that's what we need to measure to ensure the functionality we deliver to the user.

How should you go about defining SLO then?

■ Start by identifying the main flows and user journeys in your system. These should be well defined as part of the system and product specifications.

■ Then for each flow, clarify the expected end result from the user perspective, to define the SLI. This should also be a direct derivative of the product flow definition.

■ If needed, add missing instrumentation to track, collect and aggregate the relevant metrics to measure the defined SLI.

■ Make sure that the relevant flow context is propagated throughout your system. This will serve to associate a metric with the respective tenant, account or similar entities.

■ Carefully define the SLO around each SLI, to meet technical and business goals. This often involves additional stakeholders, to factor in the tradeoff between stability and velocity of innovation.

■ Start monitoring the SLI and set relevant alerting according to the threshold defined by the SLO. Track your error budget regularly to see how close you get to the SLO bar.

Dotan Horovits is Principal Developer Advocate at Logz.io
Share this

The Latest

April 25, 2024

The use of hybrid multicloud models is forecasted to double over the next one to three years as IT decision makers are facing new pressures to modernize IT infrastructures because of drivers like AI, security, and sustainability, according to the Enterprise Cloud Index (ECI) report from Nutanix ...

April 24, 2024

Over the last 20 years Digital Employee Experience has become a necessity for companies committed to digital transformation and improving IT experiences. In fact, by 2025, more than 50% of IT organizations will use digital employee experience to prioritize and measure digital initiative success ...

April 23, 2024

While most companies are now deploying cloud-based technologies, the 2024 Secure Cloud Networking Field Report from Aviatrix found that there is a silent struggle to maximize value from those investments. Many of the challenges organizations have faced over the past several years have evolved, but continue today ...

April 22, 2024

In our latest research, Cisco's The App Attention Index 2023: Beware the Application Generation, 62% of consumers report their expectations for digital experiences are far higher than they were two years ago, and 64% state they are less forgiving of poor digital services than they were just 12 months ago ...

April 19, 2024

In MEAN TIME TO INSIGHT Episode 5, Shamus McGillicuddy, VP of Research, Network Infrastructure and Operations, at EMA discusses the network source of truth ...

April 18, 2024

A vast majority (89%) of organizations have rapidly expanded their technology in the past few years and three quarters (76%) say it's brought with it increased "chaos" that they have to manage, according to Situation Report 2024: Managing Technology Chaos from Software AG ...

April 17, 2024

In 2024 the number one challenge facing IT teams is a lack of skilled workers, and many are turning to automation as an answer, according to IT Trends: 2024 Industry Report ...

April 16, 2024

Organizations are continuing to embrace multicloud environments and cloud-native architectures to enable rapid transformation and deliver secure innovation. However, despite the speed, scale, and agility enabled by these modern cloud ecosystems, organizations are struggling to manage the explosion of data they create, according to The state of observability 2024: Overcoming complexity through AI-driven analytics and automation strategies, a report from Dynatrace ...

April 15, 2024

Organizations recognize the value of observability, but only 10% of them are actually practicing full observability of their applications and infrastructure. This is among the key findings from the recently completed Logz.io 2024 Observability Pulse Survey and Report ...

April 11, 2024

Businesses must adopt a comprehensive Internet Performance Monitoring (IPM) strategy, says Enterprise Management Associates (EMA), a leading IT analyst research firm. This strategy is crucial to bridge the significant observability gap within today's complex IT infrastructures. The recommendation is particularly timely, given that 99% of enterprises are expanding their use of the Internet as a primary connectivity conduit while facing challenges due to the inefficiency of multiple, disjointed monitoring tools, according to Modern Enterprises Must Boost Observability with Internet Performance Monitoring, a new report from EMA and Catchpoint ...