Skip to Content

Load Balancing & Auto Scaling

Scalability, elasticity and high availability, and how Elastic Load Balancing and EC2 Auto Scaling deliver them.

What it is

An app that runs on one server has two problems: when traffic grows, the server gets slow, and when the server fails, the app is down. This group covers the two services that fix both:

Used together, across several Availability Zones, they're the standard design for almost every web application on AWS.

Scalability and high availability

Vertical scaling moves to a bigger instance, horizontal scaling adds instances, high availability spreads them across AZs Vertical scaling moves to a bigger instance, horizontal scaling adds instances, high availability spreads them across AZs

Three ideas that are often confused.

Scalability means a system can handle a bigger load by adapting. There are two kinds. The course explains them with a call centre:

Vertical scalability (scale up and down)

Make the instance bigger, like replacing a junior phone operator with a senior one who handles more calls.

  • Example: move an app from a t3.micro to a t3.large. On EC2 the range runs from t3.nano (0.5 GiB of memory) to high-memory U instances with up to 32 TiB.
  • Common for systems that aren't distributed, such as a database. RDS and ElastiCache scale vertically.
  • There's always a hardware limit, and changing size usually means a restart.

Horizontal scalability (scale out and in)

Add more instances, like hiring more operators. This is also called elasticity when it happens automatically with demand.

  • Needs a distributed system: the app must work when requests land on any instance.
  • Normal for modern web applications, and straightforward on AWS with Auto Scaling groups and load balancers.

High availability

High availability means running the app in at least two data centres (Availability Zones), so it survives losing one, like having call centres in two cities.

  • Active: instances in every AZ serve traffic at once (horizontal scaling across AZs).
  • Passive: a standby waits in another AZ and takes over on failure (for example RDS Multi-AZ).
  • For EC2: an Auto Scaling group and a load balancer, both set to use several AZs.

Scalability is about load; high availability is about failure. They usually go together, but one doesn't guarantee the other: ten instances in one AZ scale well but go down with the AZ.

In this group

Load balancing

Auto Scaling

Exam tips

  • "Handle more load by adding instances", "elastic" → horizontal scaling with an Auto Scaling group.
  • "Survive the failure of an AZ / data centre" → instances in at least two AZs behind a load balancer.
  • "Database needs more power" → usually vertical scaling (a bigger instance class), or read replicas.
  • "Highly available and scalable web tier" → ALB + Auto Scaling group across multiple AZs.

AWS documentation

On this page

Open notes

Spotted a mistake?

These notes are open source. Suggest a fix, or star the repo if they helped you.

Suggest an edit

For AI agents: llms.txt · llms-full.txt