Instiq
Chapter 2 · Design for New Solutions·v2.1.0·Updated 7/16/2026·~11 min

What's changed: Service coverage: added catalog sections (s4 compute/DB/storage/network, s5 analytics/ML/IoT/media/integration)

2.2Scalable, Loosely Coupled Architectures

Key points

Understand elasticity and decoupling—Auto Scaling/ELB, decoupling with SQS/SNS/EventBridge, serverless (Lambda/API Gateway/Step Functions), and caching. Handle demand swings and contain failures.

Large-scale design hinges on loose coupling and horizontal scaling. Decouple components with queues/events and follow demand with Auto Scaling.

2.2.1Decoupling and scaling

Diagram of a scalable, loosely coupled architecture: user requests pass through an Application Load Balancer to an Auto Scaling group (EC2/containers across AZs scaling with demand); work is buffered in an SQS queue consumed asynchronously by workers (decoupling producer/consumer, absorbing spikes, enabling retries); SNS/EventBridge fan out events to multiple subscribers; serverless (Lambda + API Gateway + Step Functions) runs event-driven processing; and ElastiCache fronts the database to reduce load.
Loosely coupled, scalable architecture
  • Auto Scaling + ELB: spread across AZs and scale horizontally with demand; improves fault tolerance.
  • SQS: decouple producer/consumer via a queue; absorb spikes and improve reliability with retries.
  • SNS/EventBridge: fan out events to multiple subscribers (pub/sub, event-driven).
  • Serverless: event-driven processing without managing servers via Lambda/API Gateway/Step Functions.
Exam point

Common on SAP-C02: absorb spikes / decouple producer-consumer = SQS, one-to-many fan-out = SNS/EventBridge, demand-following horizontal scale = Auto Scaling, workflow orchestration = Step Functions. Replacing synchronous, tightly coupled calls with async queues/events improves resilience.

Tip

Use SQS FIFO when ordering/dedup is required; EventBridge (rules/targets) for large fan-out and event routing. Front read-heavy databases with ElastiCache.

The crux of loose coupling is replacing synchronous tight calls with asynchronous queues/events. SQS has standard (high throughput, at-least-once, no ordering) and FIFO (ordering, dedup), made reliable with visibility timeout, DLQ (dead-letter queue), and long polling. One-to-many uses SNS (push pub/sub) or EventBridge (an event bus + rules for attribute-based routing, SaaS/schedule integration, schema registry); SNS+SQS fan-out (buffer in per-subscriber SQS) is also common. Scale with Auto Scaling (target-tracking/step/predictive across AZs) + ELB (ALB = L7/path-based, NLB = L4/ultra-low-latency/static IP). Serverless = Lambda (concurrency; reserved/provisioned concurrency to ease cold starts) + API Gateway + Step Functions (Standard/Express; state/retries/branching). Reduce read load with ElastiCache (Redis/Memcached, cache-aside). On SAP, the go-to is “make tightly coupled synchronous processing asynchronous and loosely coupled with SQS/SNS/EventBridge to absorb spikes, localize partial failures, and improve resilience via retries.”

ServiceModelBest for
SQSQueue (one consumer group)Absorb spikes, decouple producer/consumer
SNSPush pub/subFan out one event to many
EventBridgeEvent bus + routingAttribute routing, SaaS/schedule
Step FunctionsState machineOrchestrate multi-step with retries
Note

Scenario: deliver an order event to three independent services (inventory, billing, notifications), each processing at its own pace without dropping anything on failure. → Fan out with EventBridge (or SNS) and place an SQS queue in front of each service for buffering, retries, and a DLQ. Workers follow demand via Auto Scaling/Lambda.

Note

FAQ: Q. SQS vs SNS? → A. SQS is a queue (consumers pull; one group processes); SNS is pub/sub (push one message to many). Combining them for fan-out + buffering is common. Q. SQS standard vs FIFO? → A. Standard is high-throughput but unordered and at-least-once; FIFO guarantees ordering + dedup (with throughput limits).

Warning

Trap: “use a single standard SQS queue to deliver one event to multiple services simultaneously” is wrong—one queue is consumed by a single group; fan-out needs SNS/EventBridge (+ per-subscriber SQS if buffering). Also “standard SQS suffices for ordering” is wrong—ordering needs FIFO.

2.2.2Section summary

  • Decoupling = SQS (queue) / SNS·EventBridge (fan-out)
  • Scale = Auto Scaling + ELB / serverless = Lambda/API GW/Step Functions

Sign in to track progress — Log in.

Quick check

(just a quick review)

Q1. You want to decouple an order-intake front end from slow processing workers so spikes never drop requests. What?

Q2. You want one event delivered simultaneously to several services (email, logging, analytics). What?

Q3. You want to orchestrate a long-running workflow of multiple Lambdas with state, retries, and branching. What?

Check your understandingPractice questions for Chapter 2: Design for New Solutions