SLA Design and Composite SLAs

SLA Design and Composite SLAs

Watch the video to deepen your understanding.

Subscribe

Earn 25 points (50 with Pro) in two steps

  1. ① Read through the lesson — each section gets a ✓ as you scroll through it.
  2. ② When every section has a ✓, tap Complete lesson.

0 of 4 read · keep scrolling

✦ See fewer ads and earn double points — 50 a lesson instead of 25 — with Pro

Lesson: SLA Design and Composite SLAs

Introduction: Defining the Promise

In the world of cloud architecture, High Availability (HA) is not just a technical goal—it is a business contract. A Service Level Agreement (SLA) is a formal agreement between a service provider and a customer that defines the expected level of service, typically measured in terms of uptime (availability).

Why does this matter? If your business application goes offline, you lose revenue, damage your brand reputation, and potentially violate legal contracts. Understanding how to design for availability requires moving beyond simple "up/down" metrics and understanding how individual components aggregate into a total system reliability score.


Understanding SLAs and Uptime Percentages

SLA targets are usually expressed as a percentage of time the service is available over a specific period (e.g., a month). The "nines" represent the standard industry shorthand for reliability:

Availability Downtime per Year Downtime per Month
99% 3.65 days 7.2 hours
99.9% 8.77 hours 43.8 minutes
99.99% 52.6 minutes 4.32 minutes
99.999% 5.26 minutes 25.9 seconds

The Reality of "The Nines"

Achieving higher availability is exponentially more expensive and complex. Moving from 99% to 99.9% is relatively straightforward (adding redundancy), but moving from 99.99% to 99.999% requires sophisticated automated failover, geo-redundancy, and rigorous change management processes.


Not read yet

Composite SLAs: The Chain Effect

In modern cloud architecture, your application rarely runs on a single service. It is a Composite System. A composite SLA is the aggregate availability of all the components that must be functional for your application to work.

The Mathematical Reality

If your application depends on two services, and both must be running for the application to be available, the composite SLA is the product of their individual availabilities:

  • Service A (Web Server): 99.9%
  • Service B (Database): 99.9%
  • Composite SLA: 0.999 * 0.999 = 99.8%

Key Rule: In a series-dependent system, the total availability is always lower than the availability of the individual components. The more dependencies you add, the lower your total system reliability becomes.

Practical Example: A Multi-Tiered Application

Imagine an e-commerce site consisting of:

  1. Azure App Service: 99.95%
  2. Azure SQL Database: 99.99%
  3. Azure Storage (Blob): 99.9%

Total Availability Calculation: 0.9995 * 0.9999 * 0.999 = 0.9984 (99.84%)

Even though your database is highly available at "four nines," your total application is limited by the weakest link in your architecture.


Not read yet

Designing for Resilience

To improve your composite SLA, you must change how components interact.

1. Parallel Architectures (Redundancy)

If you have a fallback mechanism, the math changes. If you have two independent paths, the system is available if either path is up.

  • Availability: 1 - (Probability of failure of A * Probability of failure of B)

2. Graceful Degradation

Design your system so that if a non-essential service fails, the main application remains functional.

  • Example: If your "Recommendation Engine" (a separate microservice) goes down, the user can still browse and purchase products, even if they don't see "Recommended for You" items.

3. Code Implementation: Circuit Breakers

Using a pattern like the Circuit Breaker prevents your application from waiting on a failing dependency, allowing the system to fail fast and stay responsive.

// Simple conceptual implementation of a Circuit Breaker
public class CircuitBreaker {
    private bool _isOpen = false;
    private int _failureCount = 0;

    public async Task<Response> Execute(Func<Task<Response>> action) {
        if (_isOpen) {
            return FallbackResponse(); // Return cached or default data
        }

        try {
            var result = await action();
            _failureCount = 0; // Reset on success
            return result;
        } catch (Exception) {
            _failureCount++;
            if (_failureCount > 3) _isOpen = true; // Trip the circuit
            throw;
        }
    }
}

Not read yet

Best Practices and Pitfalls

Best Practices

  • Identify Critical Paths: Determine which services are truly essential for a core transaction. Isolate these from non-critical services.
  • Monitor and Measure: Use tools like Azure Monitor or AWS CloudWatch to track actual uptime versus your SLA.
  • Set Realistic Goals: Don't promise 99.99% to stakeholders if your underlying architecture or budget cannot support it.
  • Design for Failure: Assume every component will eventually fail. Implement retries, timeouts, and circuit breakers.

Common Pitfalls

  • The "Single Point of Failure" (SPOF): Forgetting that a single database instance or load balancer can bring down the entire system.
  • Ignoring Dependencies: Failing to account for third-party APIs (like payment gateways) in your composite SLA calculations.
  • Over-Engineering: Spending millions to achieve 99.999% for a service that only generates a few hundred dollars a month. Balance the cost of downtime against the cost of prevention.
  • Ignoring Human Error: Most downtime is caused by configuration changes, not hardware failure. Automate deployments to reduce risk.

Key Takeaways

  1. SLA is a Contract: It defines the uptime promise made to the business or customer.
  2. The Multiplier Effect: In a series-dependent system, your total availability is the product of all component availabilities. Adding more services generally lowers your total availability.
  3. Weakest Link: Your system's availability is capped by its least reliable component.
  4. Resilience Patterns: Use patterns like Circuit Breakers, Bulkheads, and Redundancy to mitigate the risk of dependency failure.
  5. Cost vs. Benefit: Always evaluate the business cost of downtime against the technical investment required to increase availability. High availability is not a "one size fits all" requirement.

Not read yet

Each section gets a ✓ as you scroll through it. Tap the button to jump to the next one.