Skip to main content
Welcome — Michael Forrester. This lesson covers reliability patterns for application integration services (the second pillar of the Well-Architected Framework). We’ll focus on autoscaling, load balancing, messaging, events, and orchestration — services that improve resilience, enable loose coupling, and make recovery predictable.
This lesson highlights operational controls you can turn to increase reliability: cross‑AZ deployment, health checks, autoscaling policies, throttling and retries, dead‑letter queues (DLQs), and centralized observability (CloudWatch, access logs, VPC Flow Logs).

Auto Scaling and Load Balancers

Auto Scaling complements load balancers to provide automated recovery and elastic capacity. A typical pattern is a virtual front-end (an Application Load Balancer or other load balancer) distributing traffic across an Auto Scaling group of instances in multiple Availability Zones (AZs).
A slide illustrating AWS Autoscaling architecture: an Application Load Balancer directing HTTP/S traffic to an Auto Scaling group of EC2 instances spread across multiple Availability Zones inside a VPC. A small bar chart shows capacity changes over a week and accompanying text explains autoscaling as an enabler service.
How Auto Scaling improves reliability
  • Automated recovery: when an instance fails, Auto Scaling launches a replacement based on the configured launch template or configuration.
  • High availability: distribute instances across multiple AZs so capacity can be restored in other AZs if one AZ degrades.
  • Loose coupling: a load-balancing abstraction decouples clients from instance lifecycles and enables rolling updates with minimal client impact.
Cross-zone load distribution
  • Enable cross-zone load balancing when you need even traffic distribution across AZs. ALB and NLB defaults and behaviors can vary by region and account — verify the behavior in your environment.
  • Tune Auto Scaling policies (target tracking, step/dynamic, predictive) to control responsiveness and cost. Target tracking is often simplest; predictive scaling works well for predictable traffic patterns.
An architectural diagram titled "Autoscaling" comparing Cross‑Zone Load Balancing disabled vs enabled. It shows two availability zones with uneven connection counts when disabled (e.g., 8.33 vs 12.5) and equalized 10/10 distribution when enabled.
Compare Load Balancer types Application Load Balancer (ALB)
  • ALB routes HTTP/HTTPS traffic using listener rules and target groups; use path or host-based routing to split traffic to different backends.
  • Configure target group health checks (path, timeout, healthy/unhealthy thresholds) so ALB can stop sending traffic to unhealthy targets.
  • Span Auto Scaling groups across multiple AZs to allow instance replacement in other AZs during AZ-level failures.
  • Use ALB access logs (delivered to S3) and CloudWatch metrics to analyze request paths, client IPs, response codes, and latencies.
  • ALB can terminate TLS, reducing backend CPU and centralizing certificate management.
ALB routing and observability tips
  • Route different traffic types by using multiple listeners or listener rules (e.g., mobile vs. desktop paths).
  • Combine UnHealthyHostCount and latency metrics in CloudWatch to detect backend degradation early.
An architecture diagram titled "Application Load Balancer" showing an ALB deployed in an Outpost/COIP subnet routing client requests (from an on‑prem network through a Local Gateway) to instances in an auto-scaling group inside the Outpost private subnet/VPC.
Network Load Balancer (NLB)
  • NLB is optimized for ultra‑low latency and volatile workloads. It forwards traffic at the transport layer without path‑based routing.
  • Use transport-level health checks (TCP/TLS/UDP) to verify reachability. For application‑level checks (HTTP semantics), prefer ALB target groups.
  • NLB supports static Elastic IPs per AZ — valuable when you must whitelist IP addresses.
  • Access log availability depends on listener protocols and settings — consult the NLB documentation for your configuration.
VPC Flow Logs for low-level monitoring
  • Enable VPC Flow Logs on subnets or ENIs where you need IP‑level telemetry. Flow logs capture source/destination IPs and ports, protocol, packet/byte counts, and accept/reject decisions.
  • Example VPC Flow Log lines:
NLB access logs and TLS:
  • For TLS‑level insights, enable access logs where supported and inspect logs together with VPC Flow Logs for full packet- and request-level visibility.
A network diagram showing an AWS architecture for a Network Load Balancer: an on‑prem server goes through an egress firewall to a static Elastic IP, into an NLB and target group, then to an ALB and backend services in private subnets inside a VPC. The slide notes that NLBs support IP addresses per Availability Zone for static usage.
A simple architecture diagram titled "Network Load Balancer" showing a user connecting through an NLB to app nodes. The NLB also writes access logs to an S3 bucket.
Gateway Load Balancer (GWLB)
  • Use GWLB to insert virtual appliances (IDS/IPS, NGFW, DPI) into flows without changing source/destination semantics.
  • Integrate GWLB with an Auto Scaling group of appliances. Ensure each appliance registers with the GWLB and responds to health checks so traffic is routed only to healthy appliances.
  • GWLB exposes CloudWatch metrics and can be observed via CloudTrail and VPC Flow Logs.
A slide showing a gateway load balancer forwarding traffic through a set of inspection appliances and back to endpoints, illustrating how traffic is routed via a local gateway and inspected by autoscaled security appliances.

API Gateway

API Gateway provides managed REST, HTTP, and WebSocket API endpoints with built-in features for throttling, caching, validation, and staged deployments (including canary releases). Supporting REST and WebSocket APIs
  • Use separate API Gateway deployments or stages for REST/HTTP and WebSocket APIs because WebSocket APIs are stateful and long‑lived while REST is stateless.
  • For security/latency reasons, you may use private API endpoints (VPC endpoints) for internal services.
A slide asking how an API Gateway can support both REST and real-time WebSocket APIs. It lists four numbered options: enabling stateful WebSocket and stateless HTTP APIs, multiple deployment stages, private API endpoints, and caching API responses.
Traffic spikes, throttling, and burst control
  • API Gateway uses a token‑bucket model for throttling and burst handling. Apply per‑method and per‑stage throttling, and use usage plans with API keys for per‑consumer quotas.
  • Protect backends by setting conservative default throttles and incrementally increasing limits based on observed load.
If you have bursty traffic or strict SLAs, configure throttling and backoff in clients. Uncontrolled bursts can exhaust backend resources even if the API Gateway throttles requests.
A diagram of an API Gateway illustrating the token-bucket rate-limiting model. It shows orange tokens in a bucket being refilled at a throttling rate and removed one per request to represent burst capacity.
Canary deployments and monitoring
  • Use staged canaries to route a percentage of traffic to a new deployment. Monitor execution metrics (latency, errors, integration latencies) in CloudWatch — promote or rollback based on thresholds.
  • Use API Gateway execution metrics and logs to drive CloudWatch Alarms and dashboards.
A screenshot of the AWS API Gateway "Prod Stage Editor" Canary tab showing the Invoke URL and controls. It highlights Canary settings with a blue "Promote Canary" button and request distribution set to 90% Canary / 10% Prod.
A dashboard titled "API Gateway" showing API usage metrics, including a pie chart of month-to-date traffic by usage plan, a horizontal bar chart of top enterprise customers by traffic, and a colored pivot table of URL path usage.

AppFlow

  • AppFlow is a managed, highly available data integration service that syncs data between SaaS applications and AWS services with built-in redundancy.
  • For visibility, use the AppFlow console and CloudWatch metrics to track flow runs, failures, and throughput. Built‑in redundancy reduces the operational surface and lets you focus on data correctness and monitoring.
A quiz slide asking how to gain visibility into AWS AppFlow flow metrics. It lists four options: enabling flow logs in Amazon S3, creating CloudWatch dashboards, caching flow data in Amazon ElastiCache, and implementing an Application Load Balancer.

Messaging and Events

For resilient, loosely-coupled architectures use a combination of pub/sub, queues, brokered messaging, and event buses. Comparison: SNS, SQS, Amazon MQ, EventBridge Simple Notification Service (SNS)
  • SNS is a scalable pub/sub service. Use DLQs or integrate with other services to handle undeliverable messages.
  • Monitor SNS using CloudWatch metrics (e.g., NumberOfMessagesPublished, NumberOfNotificationsDelivered) and use tracing (AWS X-Ray where applicable) to correlate end-to-end flows.
A diagram titled "Simple Notification Service" showing an AWS workflow where Amazon Connect → CloudWatch → CloudWatch Alarm publishes to an Amazon SNS topic. The SNS topic sends email and SMS notifications and invokes an AWS Chatbot (with IAM policies) to post alerts to a Slack channel.
Simple Queue Service (SQS)
  • SQS offers a logical queue surface backed by many servers for durability and scale.
  • Use long polling to avoid frequent empty responses — long polling reduces API calls and latency for consumers.
  • Visibility timeouts prevent multiple consumers from processing the same message simultaneously. If processing fails, the message becomes visible again after the timeout — enabling at‑least‑once delivery semantics.
  • For strict ordering and deduplication use FIFO queues (remember throughput characteristics differ from standard queues).
A diagram titled "Simple Queue Service" showing three system components on the left and multiple cylindrical SQS servers on the right containing colored message tokens labeled A–E. It illustrates how a single logical queue is distributed across many hidden servers for scalability.
A slide diagram titled "Simple Queue Service" showing colored "Auction" message boxes (A2, A1, C5, etc.) flowing into a green SQS FIFO queue that lists the resulting order. It also shows the direction of travel and a note about enabling First In First Out for ordering reliability.
Amazon MQ
  • Amazon MQ provides managed brokers (ActiveMQ, RabbitMQ) and supports standard protocols (AMQP, MQTT, STOMP, JMS).
  • For broker reliability, use mirrored queues or clustered brokers to keep message state synchronized across instances.
  • Configure redelivery policies, priority dispatch, eviction policies, and DLQs to control processing behavior and prevent failed messages from looping indefinitely.
An infographic slide asking what Amazon MQ configuration should be used to manage message redeliveries for a healthcare app. It lists four recommendations: enable a Dead Letter Queue, integrate with AWS Lambda, use message filtering, and publish failed messages to an SNS topic.
A technical architecture diagram showing Amazon MQ brokers connecting a customer datacenter and multiple AWS VPCs via transit gateways and firewalls. It also shows app servers, Apache/ Amazon MQ icons, and Lambda-based microservices interacting with the message brokers.
EventBridge (serverless event bus)
  • EventBridge routes events using event patterns and supports filtering, retries, and event replay.
  • Prevent noisy or harmful events with fine-grained event patterns and transform events when routing to different targets.
  • Use event replay or archive to reprocess events for recovery, backfilling, or testing. Persist events to S3 if you need durable archives for replaying later.

Workflows and Orchestration

Step Functions
  • Step Functions orchestrate distributed workflows as state machines. Use retries, catchers, exponential backoff, and fallback states to handle transient and persistent failures.
  • The console visualizer and CloudWatch metrics provide execution visibility for debugging and operational monitoring.
Simple Workflow Service (SWF)
  • SWF is an older managed workflow engine where you control worker placement. Run tasks across multiple AZs and configure activity heartbeats to signal progress.
  • Use CloudWatch metrics and SWF heartbeats to detect stalled workflows and drive automated remediation.
A diagram titled "Simple Workflow Service" showing a linear order-processing flow from "Customer Order (Start)" → Verify Order → Charge Credit Card → Ship Order → Record Completion → End. Icons beneath the steps represent order verifiers, credit card processors, warehouse employees, and database recorders.
A slide asking how Amazon SWF can provide operational insights into workflow executions. It lists four solutions: CloudWatch metrics and logs, SWF activity heartbeats, integration with AWS Step Functions, and running tasks redundantly across zones.
Managed Workflows for Apache Airflow (MWAA)
  • MWAA provides managed Apache Airflow with options for Multi‑AZ deployment. Use redundant schedulers and workers, configure task retries, and send logs to CloudWatch for observability.
Simple Email Service (SES)
  • SES is a managed email platform for sending and receiving mail with deliverability tools and reputation metrics.
  • Use the mailbox simulator and Virtual Deliverability Manager to validate rendering and analyze open/click/delivery rates before large campaigns.
  • Integrate SES with SNS, Lambda, and S3 for inbound processing, scanning, and archival.
A diagram titled "Simple Email Service" showing an AWS email-processing workflow. It depicts Route 53 and SES receiving email, SNS fanout to a Lambda that extracts data, and S3 buckets storing emails and attachments.
A presentation slide titled "Simple Email Service" showing an SES/Virtual Deliverability Manager dashboard. The screenshot displays account metrics (open rate 48%, click rate 27%, total send volume 10,000) and a table of sending identities with delivery stats.
A presentation slide asks how Amazon SES can help test email rendering across providers and lists four numbered options. The highlighted answer is "By leveraging the SES mailbox simulator to view email renderings."

Summary

  • Application integration services are typically highly managed and provide built‑in redundancy. Your primary responsibilities are configuration and architecture: cross‑AZ deployment, proper health checks, autoscaling integration, throttling and canary strategies, DLQs and retries, and comprehensive observability.
  • Reliability patterns to apply:
    • Distribute across AZs and regions for fault isolation.
    • Use health checks and target groups to quickly remove unhealthy nodes.
    • Integrate Auto Scaling with load balancers and appliance fleets.
    • Employ throttling, circuit breakers, and canary deployments to limit blast radius.
    • Use DLQs, retries with backoff, and event replay to recover from failures.
    • Centralize logs and metrics (CloudWatch, access logs, VPC Flow Logs) for rapid detection and remediation.
  • Loose coupling — via queues, topics, and API front ends — helps isolate failures and enables graceful recovery.
This concludes the application integration section of this lesson.

Watch Video