Study Guide945 words

Mastering High Availability and Resiliency on AWS

High availability and resiliency

Mastering High Availability and Resiliency on AWS

This study guide focuses on the architectural principles required to design and maintain highly available and resilient systems on AWS, specifically tailored for the Solutions Architect Professional (SAP-C02) exam.

Learning Objectives

By the end of this guide, you should be able to:

  • Differentiate between High Availability (HA) and Disaster Recovery (DR).
  • Design architectures that remediate Single Points of Failure (SPOF).
  • Implement loosely coupled dependencies using messaging services.
  • Configure resilient hybrid connectivity using AWS Direct Connect and VPN.
  • Evaluate and manage service quotas and IP address allocation for scaling.

Key Terms & Glossary

  • High Availability (HA): The ability of a workload to remain functional despite component-level failures. Focuses on "local" failures (e.g., a single instance or AZ).
  • Resiliency: The ability of a system to recover from interruptions and dynamically handle changes in demand.
  • Disaster Recovery (DR): The process of preparing for and recovering from large-scale events (e.g., regional outages).
  • Single Point of Failure (SPOF): Any part of a system that, if it fails, will stop the entire system from working.
  • Loose Coupling: An approach where components have little or no knowledge of the internal workings of other components, typically achieved via SQS or SNS.

The "Big Idea"

In a distributed cloud environment, failure is inevitable. The "Big Idea" of HA and Resiliency is to transition from Reactive Recovery (fixing things when they break) to Proactive Design (building systems that are "self-healing"). This involves distributing resources across multiple Availability Zones, automating scaling, and ensuring that data is replicated in real-time so that the loss of any single component is invisible to the end user.

Formula / Concept Box

ConceptMetric / RuleDescription
Availability %(Up/(Up+Down))×100(Up / (Up + Down)) \times 100The percentage of time a system is operational.
SLA SerialA×B=TotalA \times B = TotalFor sequential components, total availability is the product of both.
SLA Parallel$1 - (1-A) \times (1-B)$For redundant components, total availability is 1 minus the probability both fail.
Subnet Reservation5 IP AddressesAWS reserves the first 4 and the last 1 IP in every CIDR block.

Hierarchical Outline

  • I. Foundational HA Components
    • Compute Scaling: Using Auto Scaling Groups (ASG) to maintain instance counts and Elastic Load Balancing (ELB) to distribute traffic.
    • Storage Replication: Utilizing Amazon RDS Multi-AZ for synchronous replication and Amazon S3 for cross-region replication.
  • II. Advanced Resiliency Patterns
    • Decoupling: Using Amazon SQS as a buffer to prevent system-wide failure during traffic spikes.
    • Route 53 Policies: Implementing Latency-based or Geolocation routing to direct users to the most resilient endpoint.
  • III. Hybrid & Connectivity Resiliency
    • Direct Connect (DX): Deploying redundant connections at separate DX locations.
    • Failover Mechanisms: Setting up DX to VPN failover as a cost-effective backup strategy.

Visual Anchors

High Availability Multi-AZ Architecture

Loading Diagram...

Redundant Hybrid Connectivity (DX + VPN)

\begin{tikzpicture}[node distance=2cm, every node/.style={draw, rectangle, align=center, fill=blue!10}] \node (OnPrem) {On-Premises\Data Center}; \node (VGW) [right=3cm of OnPrem, fill=orange!20] {AWS Virtual Private\Gateway}; \node (VPC) [right=2cm of VGW] {VPC};

code
\draw[thick, red] (OnPrem) -- node[above, draw=none, fill=none] {Direct Connect (Primary)} (VGW); \draw[thick, blue, dashed] (OnPrem) to [bend right=45] node[below, draw=none, fill=none] {Site-to-Site VPN (Backup)} (VGW); \draw[thick] (VGW) -- (VPC);

\end{tikzpicture}

Definition-Example Pairs

  • Self-Healing: The ability of a system to detect failure and automatically remediate it.
    • Example: An EC2 Auto Scaling Group detecting a failed health check and terminating the instance, then launching a fresh one to replace it.
  • Single-AZ Constraint: Some workloads cannot be distributed across AZs due to latency requirements.
    • Example: Amazon EMR clusters are often constrained to a single AZ for job performance. Resiliency here requires automated redeployment scripts to recreate the cluster in a new AZ if the original fails.

Worked Examples

Scenario: Remediating a Single Point of Failure

Problem: A legacy application runs on a single EC2 instance with a local MySQL database. If the instance fails, the business loses all data and access.

Step-by-Step Remediation:

  1. Extract Data: Move the database from the EC2 instance to Amazon RDS Multi-AZ. This provides automated synchronous replication to a standby instance in another AZ.
  2. Stateless Compute: Modify the application to store session data in Amazon ElastiCache or DynamoDB so the EC2 instances are stateless.
  3. Implement ASG: Wrap the EC2 instances in an Auto Scaling Group with a minimum capacity of 2 across two different AZs.
  4. Load Balance: Place an Application Load Balancer (ALB) in front of the ASG to handle traffic distribution and health checks.

Checkpoint Questions

  1. What is the main difference between HA and DR in terms of scope?
  2. Why must an architect account for 5 reserved IP addresses when planning VPC subnets?
  3. In a hybrid environment, what is a cost-effective alternative to having two separate Direct Connect locations?
  4. Which AWS service would you use to decouple a front-end web tier from a back-end processing tier to ensure high resiliency?

[!TIP] Answer Hints: 1. HA = Local/Component failure; DR = Regional/Large-scale failure. 2. AWS reserves the first 4 and last 1 IP for internal networking. 3. DX for primary and VPN for backup. 4. Amazon SQS.

Muddy Points & Cross-Refs

  • EMR Resiliency: Students often struggle with why EMR is Single-AZ. It is for performance (reduced inter-node latency). Cross-ref: Data Engineering domain for EMR automation.
  • Sync vs Async Replication: RDS Multi-AZ is Synchronous (HA), while RDS Read Replicas are usually Asynchronous (Scalability/DR). Mixing these up is a common exam pitfall.

Comparison Tables

FeatureHigh Availability (HA)Disaster Recovery (DR)
Primary GoalMinimize downtime (Uptime)Business Continuity (Recovery)
ScopeAvailability Zones / InstancesRegions / Data Centers
ImplementationELB, ASG, Multi-AZ RDSCross-Region Replication, Backup/Restore
CostUsually higher (Always-on)Variable (Pilot Light vs. Warm Standby)
ConnectivityPerformanceCostResiliency
Direct ConnectHigh / ConsistentHighMedium (if single location)
Site-to-Site VPNVariable (Internet)LowHigh (via multiple tunnels)
DX + VPN FailoverHigh (Primary)BalancedVery High

Ready to study AWS Certified Solutions Architect - Professional (SAP-C02)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free