Skip to main content

Choosing weights

Reading time: 0 minute(s) (0 words)

Now that we understand how a composite SLO's error budget is calculated and how component weights influence it, the next key question is: how do we choose the right values for our SLOs?

Selecting the optimal configuration for an SLO is more art than science. There’s no universal rule dictating whether a 99% target is better than 95%, or whether equal weights are better than different ones. The best approach depends on the context and the specific requirements of your system.

How to choose weights?​

Let's begin with weights. Weights are used to represent the relative importance of component SLOs, acting as a proxy for the importance of the reliability of the services they measure. Assign higher weights to the SLOs that are more critical, and lower weights to those that are less essential. Check the examples below for use-case scenarios based on SLO types.

Example 1: Based on SLO type (availability-critical SLOs)​

When managing both availability and latency SLOs, it's often more critical to ensure a service is available than to optimize response speed. A slow but functional service is typically better than one that’s completely unavailable. This prioritization can be represented by assigning higher weights to availability SLOs compared to latency SLOs. You can see an example of this approach in the composite use case guide.

Example 2: Based on SLO type (latency-critical SLOs)​

In some cases, latency is just as critical as availability, such as in High-Frequency Trading (HFT), where transactions must be completed within milliseconds to stay competitive. In these scenarios, the latency SLO is just as important as the availability SLO, and they should be assigned similar or equal weights to reflect their equal significance.

Example 3: Based on high-level non-functional business requirements​

Suppose you already have composite SLOs for the reliability of different steps in a multi-step user journey, and now you want to create a composite SLO representing the entire journey. The choice of weights should be based on the relative business importance of each step.

For example, in a food-delivery app, the user journey might include steps like browsing restaurants, viewing menus, adding items to the cart, placing the order, processing payment, tracking the order, and providing feedback after delivery. Steps like placing the order and payment processing are critical for customer satisfaction, while gathering feedback is less essential. This difference in importance should be reflected in the assigned weights.

An example of this approach is also used in a sample use case .

Example 4: Based on component SLO targets​

The targets set for individual SLOs don’t directly affect the composite SLO, as the composite SLO is based on the combined reliability of its components rather than individual error budgets. However, SLO targets represent expectations for reliability, which can serve as a proxy for how sensitive the composite should be to each component. One approach is to assign weights based on the inverse of the error budget for a given component, ensuring that higher reliability expectations translate into greater influence on the composite SLO:

SLOTargetBudgetWeightWeight (simplified)Normalized Weight
SLO A99.00%100% - 99% = 1.00%100% / 1% = 1002525 / (25+10+50+1) = 29%
SLO B97.50%100% - 97.50% = 2.50%100% / 2.5% = 401010 / (25+10+50+1) = 12%
SLO C99.50%100% - 99.50% = 0.50%100% / 0.5% = 2005050 / (25+10+50+1) = 58%
SLO D75.00%100% - 75.00% = 25.00%100% / 25% = 411 / (25+10+50+1) = 1%

This approach normalizes the impact of component SLOs on a composite SLO based on their error budgets. The higher the SLO’s target, the greater its weight. For example, a small amount of error in SLO C will have a significant impact on the composite SLO because SLO C has a very tight budget, indicating a high reliability expectation. Conversely, SLO D, with a budget 50 times larger than SLO C, would require 50 times more error to affect the composite in the same way. In essence, this method ensures that each component’s budget is treated equally within the composite calculation.

tip

If you’re unsure how to start assigning weights, begin by assigning identical weights to all components and adjust them later based on the impact each SLO has on the composite. learn more about impact.

Changing weights doesn't reset the budget like some other SLO edits. Feel free to experiment and determine what works best for your needs. The key criterion for assessing an SLO’s configuration is its usefulness to you.