SLIs・SLOs・SLAs
Tags: sre, sli, slo, sla
Published: 2022-09-10 13:33:21

This article is a translation of [SLI・SLO・SLAについて](https://bmf-tech.com/categories).

# About SLIs, SLOs, and SLAs
I will summarize what I have investigated about SLI, SLO, and SLA.

# What are SLOs, SLIs, and SLAs?
SLO, SLI, and SLA are indicators, targets, and agreements related to service levels.
A service level is a specific measure of service provided over a period of time.

- SLI (Service Level Indicator)
  - Service level indicators
- Indicators, metrics to measure service levels
- ex. availability, latency, error rate, throughput
- SLO (Serivce Level Objective)
  - service level targets
    - Target quantitative or qualitative value of service level
    - Consider external dependencies
      - Communication with external services, externally linked parts such as SLO of managed services, etc.
- SLAs (Service Level Agreements)
  - Service level agreement
    - Service level agreements and guarantees between service providers and users
    - It is better to set the target value looser than SLO

# How to set SLI/SLO
I think it's good that the best practices advocated by NewRelic are easy to work with.

[newrelic.com - Best practices for setting SLI/SLO in modern systems](https://newrelic.com/us/blog/best-practices/best-practices-for-setting-slos-and-slis -for-modern-complex-systems)

It introduces how to formulate SLI/SLO by defining system boundaries, defining functions for each boundary, defining availability for each function, and defining SLI for availability measurement.

When starting the operation of SLI/SLO, it is recommended to start operation with loose values ​​as simple as possible.

cf. [sre.google - Chapter 4 - Service Level Objectives](https://sre.google/sre-book/service-level-objectives/#indicators-o8seIAcZ)

When I actually formulated SLI/SLO for my business, I followed this NewRelic practice, but I adjusted the functional units so that they were not too detailed.

If the unit of function is made finer from the beginning, the operation will become difficult, so I think it is better to adjust the granularity as necessary during operation.

#Tips
Tips for keywords related to SLI/SLO.

## The difference between reliability and availability
- reliability
  - A characteristic of a system that is the degree of tolerance to failure
- Availability
  - Degree to which the system can continue to operate

## List of uptime and downtime, availability calculation
| Availability | Annual Downtime | Monthly Downtime |
| -------- | ------------ | ------------ |
| 99.0% | 87.6 hours | 7.6 hours |
| 99.5% | 43.8 hours | 3.65 hours |
| 99.9% | 8.76 hours | 43.8 minutes |
| 99.95% | 4.38 hours | 21.9 minutes |
| 99.99% | 52.56 seconds | 4.38 minutes |
| 99.999% | 5.256 seconds | 26.28 seconds |
| 99.9999% | 31.536 seconds | 2.628 seconds |

## What is an error budget?
A budget for error, a measure of acceptable reliability calculated relative to an SLO.
ex. SLO 99.99% → error budget 0.01% or less

# Impression
By making the service level measurable, it becomes possible to observe whether service users (users or systems) are able to provide services satisfactorily, and for service providers, it becomes an indicator of whether improvement of the service level is necessary. I thought I'd get

# Reference
- [newrelic.com - What are SLOs, SLIs and SLAs? ](https://newrelic.com/jp/topics/what-are-slos-slis-slas#:~:text=%E3%82%B5%E3%83%BC%E3%83%93%E3% 82%B9%E3%83%AC%E3%83%99%E3%83%AB%E7%9B%AE%E6%A8%99%EF%BC%88SLO%3AService,%E6%B8%AC%E5 %AE%9A%E5%80%A4%E3%81%8A%E3%82%88%E3%81%B3%E3%83%A1%E3%83%88%E3%83%AA%E3%82 %AF%E3%82%B9%E3%81%A7%E3%81%99%E3%80%82)
- [newrelic.com - New Relic Hands-on: SLI/SLO Design Basics](https://newrelic.com/sites/default/files/2022-02/NRU303_SLISLO_20220222.pdf)
- [cloud.google.com - Thinking about SLO, SLI, SLA: What CRE learned in the field](https://cloud.google.com/blog/ja/products/gcp/availability-part-deux-cre -life-lessons)
- [cloud.google.com - SRE Fundamentals (2021 Edition): Comparing SLIs, SLAs and SLOs](https://cloud.google.com/blog/ja/products/devops-sre/sre-fundamentals-sli -vs-slo-vs-sla)
- [cloud.google.com - SLOs, SLIs, SLAs, oh my—CRE life lessons](https://cloud.google.com/blog/products/devops-sre/availability-part-deux-cre-life- lessons)
- [cloud.google.com - how to deal with availability, that's the question: what CRE learned in the field](https://cloud.google.com/blog/ja/products/gcp/available-or -not-that-is-the-question-cre-life-lessons)
- [engineering.mericari.com - 2018/12/25 SLI/SLO in Mercari's Web Microservices](https://engineering.mercari.com/blog/entry/2018-12-25-150405/)
- [sre.google - sre-book](https://sre.google/sre-book/service-level-objectives/#indicators-o8seIAcZ)
- [qiita.com - Thoughts for formulating SLI/SLO](https://qiita.com/t-okibayashi/items/9a5085803ac0b11554a0)
- [qiita.com - Learn about SRE - Error Budget](https://qiita.com/katsulang/items/feb3070666607b7c924c#:~:text=%E3%82%A8%E3%83%A9%E3%83 %BC%E3%83%90%E3%82%B8%E3%82%A7%E3%83%83%E3%83%88%E3%81%A8%E3%81%AF%E3%80%81 %E3%82%B5%E3%83%BC%E3%83%93%E3%82%B9,%E6%8A%91%E3%81%88%E3%82%8B%E3%81%93% E3%81%A8%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82)
- [bongineer.net - The Difference Between Reliability and Availability](https://bongineer.net/entry/rasis/)
- [mathwords.net - what is the downtime for 99% availability, 99.9% etc.](https://mathwords.net/kadouritu)
- [wnkhs.net - Availability calculations and assumptions (in representative figures)](https://wnkhs.net/availability-calculation/)