7-Day AWS Refresher Series – Day 2: Load Balancing, Auto Scaling, and High Availability Patterns

7-Day AWS Refresher Series – Day 2: Load Balancing, Auto Scaling, and High Availability Patterns

Welcome to Day 2 of the AWS Refresher Series.

If you've followed along from Day 1, you've already got a solid foundation and hands-on playground set up. Today, we move deeper into designing scalable and resilient systems with Load Balancers, Auto Scaling Groups, and core High Availability principles that power modern architectures.


Theme of the Day

Load Balancing, Auto Scaling & Resiliency

Key Services To Understand

Elastic Load Balancing (ELB)

  • Distributes incoming traffic across multiple compute targets such as EC2, Lambda, and containers.

  • Eliminates single points of failure and improves application availability.

ELB Types

  • Application Load Balancer (ALB) supports HTTP/HTTPS, Layer 7 routing, host/path-based rules.

  • Network Load Balancer (NLB) supports TCP/UDP, operates at Layer 4, optimized for high performance and low latency.

  • Gateway Load Balancer routes traffic to virtual appliances (firewalls, intrusion detection systems).


Auto Scaling Groups (ASG)

  • Automatically adds or removes EC2 instances based on demand.

  • Ensures you always have the right number of instances running to handle the load.

ASG Core Components

  • Launch Template or Launch Configuration defines EC2 settings.

  • Capacity settings define minimum, maximum, and desired number of instances.

  • Scaling policies use metrics like CPU utilization to trigger scale-out or scale-in.

  • Health checks ensure that failed instances are terminated and replaced.


Health Checks

  • ELB and ASG both perform regular health checks on targets.

  • Unhealthy instances are automatically replaced or removed from rotation.

  • Custom health checks can be defined for more control over failover behavior.


Essential Architecture Principles

High Availability (HA)

  • Distribute compute resources across multiple Availability Zones.

  • Design with redundancy to ensure uptime even if one AZ becomes unavailable.

  • Use Elastic Load Balancing to route traffic evenly across healthy targets.

Fault Tolerance

  • Assume components will fail and design systems to recover without disruption.

  • Use ASGs to automatically replace unhealthy instances.

  • Leverage Multi-AZ deployments for both EC2 and databases like RDS.

Elasticity

  • Dynamically adjust resources in response to load.

  • Use CloudWatch alarms to trigger scaling policies in ASG.

  • Schedule scaling actions for predictable traffic patterns.


Hands-On Lab

Deploy a Scalable, Highly Available Web App

  • Create a custom EC2 AMI with a web server pre-installed (e.g., NGINX or Apache).

  • Create a Launch Template using the AMI and define instance type and security group.

  • Create an Auto Scaling Group using the Launch Template across two Availability Zones.

  • Create a Target Group and attach it to a new Application Load Balancer.

  • Configure health checks at both the ELB and ASG level.

  • Define a target-tracking policy to scale EC2s based on CPU usage.

  • Simulate load using tools like Apache Benchmark (ab) or stress to observe auto-scaling behavior.


Scenario-Based Review Questions

  • Why would you choose ALB over NLB in a microservices architecture?

  • How does an Auto Scaling Group maintain high availability during instance failure?

  • What happens when an EC2 instance fails a health check in an ASG?

  • How can session stickiness be achieved using ALB?

  • Which CloudWatch metrics are best suited to trigger scaling events?


Day 2 Completion Checklist

  • Reviewed and understood all three types of Load Balancers and their use cases.

  • Created a Launch Template and deployed an ASG with health checks and scaling policies.

  • Built a complete HA architecture using ALB + ASG + EC2 across multiple AZs.

  • Simulated scaling events and monitored behavior using CloudWatch metrics.

  • Practiced applying HA, fault tolerance, and elasticity in lab and design scenarios.


Coming up next: Day 3 - Storage Deep Dive - S3, EBS, EFS & Beyond

If this helped sharpen your understanding, feel free to repost, comment, or tag someone who’s working on better AWS architecture this year.

#AWS #CloudArchitecture #7DayAWSRefresher #AutoScaling #LoadBalancing #DevOps #HighAvailability #CloudDesign #InfrastructureAsCode

To view or add a comment, sign in

Others also viewed

Explore topics