MODULE 8 - Scalability and High Availability
Overview
This module covers the concepts of high availability (HA) and scalability with AWS. You will learn to design resilient architectures with Load Balancing.
Summative Assessment
This module includes Assessment 2 (25%) covering HA and Scaling.
Learning Objectives
- Understand the concepts of high availability
- Explain the operation of AWS Load Balancers
- Configure health checks
- Design a stateless architecture
- Define HA success criteria
Weekly Content
1. High Availability - Concepts
┌─────────────────────────────────────────────────────────────┐
│ HIGH AVAILABILITY │
├─────────────────────────────────────────────────────────────┤
│ │
│ Objective: Service always accessible despite failures │
│ │
│ WITHOUT HA WITH HA │
│ ─────── ─────── │
│ │
│ ┌─────────┐ ┌─────────┐ │
│ │ Instance│ ← SPOF │ ALB │ ← Distribution │
│ │ Unique │ └────┬────┘ │
│ └─────────┘ │ │
│ │ ┌────────┼────────┐ │
│ ▼ │ │ │ │
│ FAILURE = DOWN ┌┴┐ ┌┴┐ ┌┴┐ │
│ │1│ │2│ │3│ │
│ └─┘ └─┘ └─┘ │
│ AZ-a AZ-b AZ-c │
│ │
│ FAILURE of an instance = SERVICE OK │
│ │
└─────────────────────────────────────────────────────────────┘
2. Types of AWS Load Balancers
| Type | Usage | Layer | Characteristics |
|---|---|---|---|
| ALB | HTTP/HTTPS | 7 | Advanced routing, WebSocket |
| NLB | TCP/UDP | 4 | Ultra-performant, Static IP |
| CLB | Legacy | 4/7 | Old, to be avoided |
| GWLB | Appliances | 3 | Firewalls, IDS |
3. Health Checks
┌─────────────────────────────────────────────────────────────┐
│ HEALTH CHECKS │
├─────────────────────────────────────────────────────────────┤
│ │
│ The Load Balancer regularly checks the health │
│ of target instances. │
│ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ ALB │──GET /──►│Instance │ │Instance │ │
│ │ │◄──200 OK─│ (OK) │ │ (KO) │ │
│ └─────────┘ └─────────┘ └─────────┘ │
│ │ ✓ ✗ │
│ │ │
│ └──────────► Traffic sent only to instances │
│ that respond correctly │
│ │
│ Parameters: │
│ • Path: /health │
│ • Interval: 30 seconds │
│ • Healthy threshold: 3 consecutive successes │
│ • Unhealthy threshold: 2 consecutive failures │
│ │
└─────────────────────────────────────────────────────────────┘
4. Stateless Architecture
STATELESS = The application does not store state on the instance
✅ GOOD (Stateless) ❌ BAD (Stateful)
───────────────── ────────────────────
Sessions in Redis/DynamoDB Sessions on local disk
Files in S3 Files on EBS
Config in Parameter Store Config in local file
Why Stateless?
• Any instance can serve any request
• Easy horizontal scaling
• Instance replacement without data loss
Assessment 2 (25%)
Format
- HA architecture design (60%)
- Theoretical questions (40%)
Covered Content
- Load Balancing (ALB, NLB)
- Health Checks
- Multi-AZ Architecture
- Stateless design
- Availability criteria
Deliverable
Documented HA Architecture:
- Diagram with LB and Multi-AZ instances
- Health check configuration
- Justification of choices
- Theoretical availability calculation
Navigation
- High Availability Concepts
- AWS Load Balancers
- Health Checks
- Validation Quiz - 30 questions to validate your knowledge
- Lab: HA Architecture
Next week: MODULE 9 - Auto Scaling