Help Docs

Understanding SLO concepts

Implementing SLOs for reliable application performance

Organizations today rely on efficient application performance and a solid network infrastructure to ensure continuous service delivery. Site reliability engineers (SREs), developers, IT administrators, and business leaders need to ensure that applications are reliable and provide a high level of customer satisfaction. To achieve this, they must define, monitor, and iterate on service-level indicators (SLIs), which serve as key performance indicators (KPIs) for their applications.

Once the KPIs are defined, organizations monitor them by setting service-level objectives (SLOs) to maintain application reliability. The service-level agreement (SLA) is the overall contract between the provider of IT services and the users. It's performance objectives are often more achievable than the SLOs.

Use case: Ensuring SLA commitments during high-traffic events using SLO monitoring

An e-commerce platform often experiences performance slowdowns during high-traffic events like flash sales. To maintain optimal service levels, the company uses both application performance monitoring (APM) and network monitoring tools to track the health of its application and network infrastructure.

To ensure that its SLA commitments to customers are consistently met, the company defines and tracks internal SLOs based on key performance indicators from both APM and network monitors.

APM helps detect issues such as slow response times during critical user actions like the checkout process, which can lead to frustration and cart abandonment. Simultaneously, network monitoring highlights problems like high latency in data center connections, which can contribute to page load delays and slow transaction processing.

By creating SLOs tied to these monitoring tools and actively tracking SLO metrics such as burn rate and error budget, the company can proactively identify and resolve performance bottlenecks. This helps maintain high application availability and performance, especially during peak periods, ensuring that customer expectations defined in the SLA are consistently met.

Understanding the SLO concepts

Below are the steps to implement SLOs:

  1. Define KPIs

    The first step is to define KPIs, which are measurable values that reflect how effectively a system meets its reliability goals. By determining these KPIs, an organization can define its SLIs and subsequently establish SLOs based on those SLIs.

    For example, KPIs for an e-commerce platform are:
    • Application response time: The time taken for the application to respond to user requests.
    • Network availability: The uptime percentage of network connectivity.
    A KPI is a measurable value that reflects how effectively a company or system is achieving its objectives. In SLO monitoring, KPIs help track service performance, reliability, and compliance with defined goals.
  2. Configure SLIs

    SLIs are quantitative measures derived from KPIs that indicate service health.

    For example, SLIs for the above KPIs can be:
    • Application Response Time: Must be ≤ 200 ms.

    • Network Availability: Must be 99.9%.

    These SLIs should be added in the Add SLO page, selecting the appropriate evaluation method.

    SLI calculation based on the method of evaluation

    1. Time-Based Evaluation
      This method measures the SLI over a period, typically tracking service uptime or response time within a specified time window.
      SLI = (Total Good Time / Total Monitored Time) *  100
      In the above case, for a rolling period of 30 days, the network should be available for 99.9%. 

    2. Time-Slice Based Evaluation
      This method breaks time into small intervals (for example, one hour) and evaluates service performance for each slice. If the service performs well in a given slice, the entire slice counts as a successful event.
      SLI = ∑ ((Good time in a slice/Total time in a slice) *100)
      This could involve evaluating the application's response time every five seconds.
    3. Count-based Evaluation
      This evaluates the ratio of successful operations to total operations (for example, transactions, API requests).

      SLI = ( Successful Events / Total Events) * 100
      This method could be used to assess the application's availability.

      The SLI is a quantitative measure that reflects the availability and performance of a service. It is calculated as the ratio of successful service events to total service events.

  3. Calculate the Error Budget

    The error budget represents the maximum allowable downtime or failure instances before violating the SLO.

    In the above case, if the SLO Target for the e-commerce platform is set as 98%, then the allowable error that can occur in our application and network is 2%.

    Error Budget = 100% − SLO Target
    If the application remains within the error budget, the SLO is met, indicating how much failure the service can tolerate before violating the SLO.

    To calculate the error budget, consider the following time frames:
    • Total time window: The full duration selected (for example, seven days for a week, 30 days for a month)
    • Calculated time window: The total time elapsed from the start of the period to the current date and time.
    Note

    If it pertains to the current week or month, the Total time window and Calculated time window would be the same.

  4. Monitor the Burn Rate

    The burn rate measures how quickly the error budget is being consumed. A burn rate greater than one indicates that the error budget is depleting too rapidly, posing a risk of SLO violation.

    For example, if there are 4,800 application failures within the time window and the allowed failures (error budget) is 5,000, then: 
    Burn Rate = Actual Error Rate / Error Budget
    4800 / 5000 = 0.96
    A burn rate of 0.96 means the service is operating within safe limits.

    Interpretation:
    Burn Rate = 0: The error budget remains untouched.
    Burn Rate < 1: The error budget is being consumed at a healthy rate.
    Burn Rate = 1: The error budget is being used exactly as planned.
    Burn Rate > 1: The error budget is being exceeded and requires immediate action.
  5. Calculate the Error Time

    The organization must ensure that its service remains within the error time. If there are any failures in the application or network, as long as the error time is not exceeded, the application remains available to users, and the SLO is not breached.

    Error time refers to the maximum allowable duration a service can be unavailable without breaching its SLO.
    Error Time = (Error Budget / 100) × Total Time Window
    For example, if the total time window is 7 days (168 hours):
    Error Time = (5/100) x 168 = 8.4 hours
    This means the application can be unavailable for up to 8.4 hours without violating the SLO.

Implementing SLOs helps organizations proactively monitor service health and maintain application reliability. By defining KPIs, configuring SLIs, calculating error budgets, and tracking burn rates, businesses can ensure optimal performance.

These practices enable teams to detect and resolve issues before they impact end users, ultimately enhancing customer experience and operational efficiency.

Related articles

Was this document helpful?

Would you like to help us improve our documents? Tell us what you think we could do better.


We're sorry to hear that you're not satisfied with the document. We'd love to learn what we could do to improve the experience.


Thanks for taking the time to share your feedback. We'll use your feedback to improve our online help resources.

Shortlink has been copied!