Back to blog

Blog

Cloud Design Patterns Examples: 8 Worth Stealing

Cloud design patterns examples you can reuse: retry, circuit breaker, saga, strangler fig and more, with when to use each, when not to, and how to draw it.

cloud design patterns examplesUpdated 11/27/2026Shafi Khan

Cloud Design Patterns Examples: 8 Worth Stealing

Cloud design patterns are reusable answers to problems every distributed system hits eventually: flaky dependencies, traffic spikes, cross-service transactions, and the monolith nobody wants to touch. The best cloud design patterns examples to learn first are retry, circuit breaker, bulkhead, queue-based load leveling, cache-aside, strangler fig, saga and sidecar, because together they cover failure handling, load, data consistency and migration.

That's the TL;DR. The rest of this post is the part most pattern lists skip: when each one is the wrong call, and what it should look like on an architecture diagram so a reviewer can actually see it.

Because a pattern that only lives in someone's head (or in a 2023 Confluence page) isn't a pattern. It's a rumor.

What are cloud design patterns, really?

Microsoft's Cloud Design Patterns catalog puts it plainly: "Cloud design patterns provide solutions to many common challenges." The catalog lists 44 patterns, describes them as technology-agnostic, and maps each one to the Well-Architected pillars it supports. Retry maps to Reliability. Circuit Breaker maps to Reliability and Performance Efficiency. Strangler Fig maps to Reliability, Cost Optimization and Operational Excellence.

AWS covers similar ground from the implementation side. Its Prescriptive Guidance on cloud design patterns walks through patterns like anti-corruption layer, circuit breaker, event sourcing, publish-subscribe, retry with backoff, saga, strangler fig and transactional outbox, each with "the AWS implementation for the pattern."

Here's the hot take: you don't need all 44. You need about eight, deeply understood, plus the judgment to know when one is overkill.

PatternProblem it solvesTypical AWS building blocksDraw it as
Retry with backoffTransient faultsSDK retry config, Step Functions retriesAnnotated edge: attempts, backoff
Circuit breakerA dependency that stays brokenStep Functions + DynamoDB state, or a service meshBreaker node between caller and callee
BulkheadOne failure sinking everythingSeparate pools, queues, accounts or clustersPartitioned boxes with their own limits
Queue-based load levelingSpiky load on a slow serviceAmazon SQS + consumersQueue between producer and worker, plus DLQ
Cache-asideRepeated reads to a slow storeElastiCache in front of RDS or DynamoDBCache beside the data store, read path numbered
Strangler figReplacing a legacy system safelyAPI Gateway or a load balancer as routerRouter splitting traffic, legacy vs new
SagaConsistency across servicesStep Functions, or events on EventBridge/SNSNumbered steps plus compensation edges
SidecarCross-cutting concerns per serviceContainers in the same ECS task or Kubernetes podHelper box attached to the service box

→ Browse 240+ ready-made patterns in the Pattern Library

Failure-handling patterns: retry, circuit breaker, bulkhead

Retry with backoff

Retry is for failures you expect to clear on their own: a dropped connection, a brief throttle, a pod restarting. The catch is that naive retries turn a small outage into a big one. Microsoft's Retry Storm antipattern gives the rules: "Limit the number of retry attempts and duration," pause between attempts and increase the wait (for example with exponential backoff), honor retry-after headers, and don't retry client errors like 400 Bad Request, because "retrying the same request likely won't help."

A minimal Python version with capped exponential backoff and jitter:

import random
import time

class TransientError(Exception):
    pass

def call_with_retry(fn, max_attempts=4, base_delay=0.2, max_delay=5.0):
    for attempt in range(1, max_attempts + 1):
        try:
            return fn()
        except TransientError:
            if attempt == max_attempts:
                raise
            # exponential backoff with full jitter, capped
            delay = min(max_delay, base_delay * (2 ** (attempt - 1)))
            time.sleep(random.uniform(0, delay))

Jitter spreads retries out so a fleet of clients doesn't hammer a recovering service in lockstep. In real code, prefer the retry settings your cloud SDK already ships with over hand-rolled loops.

Circuit breaker

Retry assumes the problem goes away. Circuit breaker assumes it might not. Microsoft's Circuit Breaker pattern defines three states:

  • Closed: requests flow to the operation and recent failures are counted. Cross a failure threshold within a time window and the breaker trips.
  • Open: "The request from the application fails immediately and an exception is returned to the application."
  • Half-Open: "A limited number of requests from the application are allowed to pass through." Success closes the breaker; any failure reopens it.

The same page says the pattern might not be suitable for in-memory local resources, as a substitute for business-logic exception handling, or in message-driven systems where dead letter queues and built-in retries often do the job. It also calls out cases where a global load balancer or service mesh already handles failure recovery.

On AWS, the Prescriptive Guidance circuit breaker implementation uses Step Functions Express Workflows for the control flow and a DynamoDB table to track the circuit status of degraded services, with ElastiCache as an alternative store.

Bulkhead

Bulkhead is ship design applied to software: isolate parts of an application into pools so that if one fails, the others keep running. Separate thread pools, connection pools, queues, node groups, or even AWS accounts per tenant tier are all bulkheads (more on this in our dependency isolation guide). The classic smell it fixes: one slow third-party API exhausting the shared connection pool and taking checkout down with it.

On a diagram, a bulkhead is only real if the boundary and its limits are visible. "Payments pool: 50 connections" on the box beats a vague "isolated" label every time.

→ Stress-test your failure paths with the Scalability Analyzer

Load and performance patterns: queue-based load leveling and cache-aside

Queue-based load leveling

Put a queue between a bursty producer and a service that can only process so much per second. The queue absorbs spikes, the consumers drain it at a sustainable rate, and the slow service stops falling over every time marketing sends an email.

The part people forget is the dead letter queue. Without one, a poison message gets retried forever. Here's a correct Terraform setup for SQS with a redrive policy:

resource "aws_sqs_queue" "orders_dlq" {
  name                      = "orders-dlq"
  message_retention_seconds = 1209600 # 14 days
}

resource "aws_sqs_queue" "orders" {
  name                       = "orders"
  visibility_timeout_seconds = 60

  redrive_policy = jsonencode({
    deadLetterTargetArn = aws_sqs_queue.orders_dlq.arn
    maxReceiveCount     = 5
  })
}

Set the visibility timeout longer than your consumer's worst-case processing time, or messages can become visible again and get processed twice. Which brings up a sibling pattern from the Azure catalog: Idempotent Consumer, so processing a duplicate message has the same effect as processing it once. Standard SQS queues deliver messages at least once, so build consumers for duplicates.

Cache-aside

Cache-aside loads data into a cache on demand. The application checks the cache, falls back to the data store on a miss, then writes the result into the cache:

import json

def get_product(product_id, cache, db, ttl_seconds=300):
    key = f"product:{product_id}"
    cached = cache.get(key)
    if cached is not None:
        return json.loads(cached)

    product = db.fetch_product(product_id)  # source of truth
    if product is not None:
        cache.setex(key, ttl_seconds, json.dumps(product))
    return product

The trade-off is staleness. Decide explicitly how stale a read can be, set the TTL from that number, and invalidate on writes for anything where stale data causes real damage, like prices or permissions.

→ Generate a queue-backed worker architecture from a prompt with Architect AI

Migration pattern: strangler fig

Strangler fig incrementally replaces legacy functionality instead of attempting a big-bang rewrite. AWS describes it as a way to "migrate a monolithic application to a microservices architecture incrementally, with reduced transformation risk and business disruption." In the AWS strangler fig guidance, "a proxy layer intercepts requests that go to the monolithic application and routes them to either the legacy system or the new system," typically by API path, with Amazon API Gateway as the proxy.

Two details from that page are worth knowing:

  • AWS Migration Hub Refactor Spaces, which the guidance uses to orchestrate the proxy, is no longer open to new customers as of November 7, 2025. Plan with API Gateway or a load balancer directly.
  • The proxy "can become a single point of failure or a performance bottleneck." Give the router the same availability design as the systems behind it.

When not to use it: small applications where a rewrite is genuinely simpler, and systems where you can't intercept the calls at all.

The diagram for a strangler fig should show state over time. Draw the router, the legacy system, and the new services, and label which routes have moved. Better still, keep a version per migration phase so the board can see progress. We walk through phased migration diagrams in the cloud migration architecture diagram guide.

→ Map your monolith before you strangle it with Code Analysis

Data consistency pattern: saga (choreography vs orchestration)

Once each microservice owns its own database, you lose the comfy single ACID transaction. The saga pattern manages data consistency across services as a sequence of local transactions. If a step fails, earlier steps are undone with compensating transactions (refund the payment, release the inventory), which is also its own entry in the Azure catalog.

There are two ways to run a saga:

ChoreographyOrchestration
Who decides the next stepEach service, by reacting to eventsA central coordinator
CouplingServices know each other's eventsServices know only the orchestrator
VisibilityFlow is spread across servicesFlow lives in one place
Good fitShort flows, few participantsMany steps, complex failure handling
AWS exampleEvents via EventBridge or SNS/SQSAWS Step Functions workflow

Our opinion: start with orchestration once a flow has more than three or four steps. Debugging a choreographed saga at 2am means reconstructing the flow from logs across five services, and nobody is vibing with that.

To diagram a saga, number the forward steps and draw each compensation as a separate dashed edge back to the service it undoes. A sequence diagram is often clearer than a box diagram here. Our sequence diagram examples show how to draw async messages, and the event-driven architecture diagram guide covers the transactional outbox that keeps choreographed sagas from losing events.

→ Turn a saga into a clean sequence diagram with Flow IQ

Structural pattern: sidecar

The sidecar pattern deploys a helper component in a separate process or container next to the main service. Log shipping, metrics agents, TLS termination, and service mesh proxies are the common examples. In Kubernetes the sidecar is another container in the same pod; on Amazon ECS it's another container in the same task definition.

The win is consistency: every service gets the same telemetry or mTLS without each team reimplementing it in their language of choice. The cost is extra CPU and memory per replica, and one more thing to upgrade. If you run hundreds of pods, that overhead is a line item, not a rounding error.

Its close cousin, Ambassador, uses a helper to send network requests on behalf of the consumer, which is often where retries and circuit breaking get offloaded in a mesh.

→ See how sidecars fit your cluster in the Kubernetes architecture diagram guide

How to use cloud design patterns on architecture diagrams

Patterns only help reviews if they're visible. A quick checklist for any diagram that claims to use them:

  • Every retrying edge shows max attempts and backoff, not just "retries"
  • Circuit breakers are drawn as their own element with the fallback path shown
  • Bulkheads show their limits (pool sizes, concurrency, account boundaries)
  • Every queue has a dead letter queue and a named owner for it
  • Caches show TTL and the invalidation trigger
  • Strangler fig diagrams label which routes are legacy vs migrated
  • Sagas show compensating actions, not just the happy path
  • Sidecars appear in resource estimates, not just in the YAML

Run the same checklist in your design review. Our architecture review checklist for cloud applications covers the questions around it, and if you'd rather start from a known-good shape, Architecto's pattern library gives you visual starting points you can filter by provider, complexity, scale and category, then adapt in the editor.

→ Build a reusable review checklist with the free Architecture Review Checklist Builder

Key takeaways

  • Cloud design patterns are reusable solutions to recurring distributed-systems problems. Microsoft's catalog lists 44, but eight cover most day-to-day architecture work.
  • Retry and circuit breaker are partners: bounded, backed-off retries inside a breaker that fails fast when a dependency stays down.
  • Bulkheads and queues contain damage and absorb spikes. Always pair a queue with a dead letter queue and idempotent consumers.
  • Strangler fig is the safe way off a monolith, as long as the routing proxy is designed to be highly available.
  • Sagas replace distributed transactions with local steps plus compensations. Orchestration scales better than choreography as flows grow.
  • If a pattern isn't drawn and annotated on the diagram, reviewers can't verify it exists.

→ Start from a proven pattern in the Pattern Library

FAQ

What are cloud design patterns?

Cloud design patterns are reusable, mostly technology-agnostic solutions to recurring problems in distributed cloud systems, such as handling transient failures, isolating faults, buffering load, keeping data consistent across services, and migrating away from a monolith. Microsoft's Azure Architecture Center catalogs 44 of them and maps each one to the Well-Architected pillars it supports.

What is the difference between the retry and circuit breaker patterns?

Retry assumes a failure is temporary and tries the call again, ideally with a capped number of attempts and increasing waits. Circuit breaker assumes the dependency may stay broken for a while, so after a failure threshold it stops sending calls and fails fast, then lets a few trial requests through to check for recovery. Most production systems use both: bounded retries inside a circuit breaker.

Should a saga use choreography or orchestration?

Choreography, where services react to each other's events, works well for short flows with few participants. Orchestration, where one coordinator tells each service what to do and triggers compensating transactions on failure, is easier to reason about, monitor and debug once a flow has many steps or complex failure handling.

When should you not use the strangler fig pattern?

Skip it when the application is small enough that a rewrite is simpler, or when you cannot intercept the calls going into the legacy system. AWS also notes that the routing proxy can become a single point of failure or a performance bottleneck, so it needs the same availability design as any other critical component.

→ Try these patterns on your own architecture: start free

Stop redrawing the same patterns from scratch

Every team draws a queue-backed worker, a strangler router and a saga eventually. Doing it from a blank canvas each time is how annotations get skipped and DLQs get forgotten. Start from a pattern, adapt it to your system, and keep it versioned so the diagram still matches production next quarter.

→ Start free with Architecto and open the Pattern Library to grab your first one.

FAQ

Questions readers ask before they act on this page.

What are cloud design patterns?

Cloud design patterns are reusable, mostly technology-agnostic solutions to recurring problems in distributed cloud systems, such as handling transient failures, isolating faults, buffering load, keeping data consistent across services, and migrating away from a monolith. Microsoft's Azure Architecture Center catalogs 44 of them and maps each one to the Well-Architected pillars it supports.

What is the difference between the retry and circuit breaker patterns?

Retry assumes a failure is temporary and tries the call again, ideally with a capped number of attempts and increasing waits. Circuit breaker assumes the dependency may stay broken for a while, so after a failure threshold it stops sending calls and fails fast, then lets a few trial requests through to check for recovery. Most production systems use both: bounded retries inside a circuit breaker.

Should a saga use choreography or orchestration?

Choreography, where services react to each other's events, works well for short flows with few participants. Orchestration, where one coordinator tells each service what to do and triggers compensating transactions on failure, is easier to reason about, monitor and debug once a flow has many steps or complex failure handling.

When should you not use the strangler fig pattern?

Skip it when the application is small enough that a rewrite is simpler, or when you cannot intercept the calls going into the legacy system. AWS also notes that the routing proxy can become a single point of failure or a performance bottleneck, so it needs the same availability design as any other critical component.

Related reading

Keep moving through the architecture workflow.

Free tool

Architecture Review Checklist Builder

Build repeatable review packets for cloud architectures, migrations, data systems, and internal platforms without relying on static spreadsheets.

system design review checklistarchitecture governance checklistdesign review template

Free tool

RTO / RPO Calculator

Estimate recovery time and recovery point objectives with transparent assumptions your engineering and business teams can review together.

disaster recovery calculatorrecovery objective plannerbcdr planning tool

Guide

What dependency isolation means in Reliability and Resilience

What dependency isolation means in Reliability and Resilience with technical review guidance, practical artifacts, and a workflow path into diagrams, documentation, and architecture governance.

reliability architecturedependency isolationresilience engineering architecture

Guide

What resilience mechanisms means in Microservices and Distributed Systems

What resilience mechanisms means in Microservices and Distributed Systems with technical review guidance, practical artifacts, and a workflow path into diagrams, documentation, and architecture governance.

microservices architectureresilience mechanismsdistributed systems design

Comparison

Best Cloudcraft alternative for cloud architecture

Best Cloudcraft alternative for cloud architecture with a workflow-first comparison across diagrams, architecture review, technical documentation, and code-adjacent implementation evidence.

cloudcraft alternativearchitecto vs cloudcraftalternative software