Load Balancing and Auto-scaling

AWS Cloud Technology and Services Concepts

Alex Kuntz

Head of Cloud Curriculum, DataCamp

Load balancing in AWS

Load balancing ensures even distribution of incoming traffic among multiple EC2 instances, preventing overload on a single server

  • Ensures high availability
  • Provides horizontal scaling

Types of load balancers in AWS

Four icons showing classic, network, application, and gateway load balancers.

AWS Cloud Technology and Services Concepts

How does load balancing work?

 

  1. Users send requests

An architecture diagram highlighting user requests sent to a load balancer.

AWS Cloud Technology and Services Concepts

How does load balancing work?

 

  1. Users send requests
  2. Requests hit the load balancer

An architecture diagram highlighting user requests sent to a load balancer.

AWS Cloud Technology and Services Concepts

How does load balancing work?

 

  1. Users send requests
  2. Requests hit the load balancer
  3. Primary target group is instantiated by the application load balancer first

An architecture diagram highlighting a user request move from a load balance to primary EC2 instances.

AWS Cloud Technology and Services Concepts

How does load balancing work?

 

  1. Users send requests
  2. Requests hit the load balancer
  3. Primary target group is instantiated by the application load balancer first
  4. If demand increases, the load balancer activates the secondary target group and distributes the load across all instances

An architecture diagram highlighting a user request move from a load balance to primary and secondary EC2 instances.

AWS Cloud Technology and Services Concepts

What is compute elasticity?

Elasticity ensures your system can scale up or down based on demand, providing flexibility in resource allocation

  • EC2 instances achieve elasticity through EC2 Auto Scaling

 

What is EC2 Auto Scaling?

  • Automatically adjust the number of active instances based on usage and requirement
  • Optimize costs
  • Prevent over-provisioning
AWS Cloud Technology and Services Concepts

How does auto-scaling work?

  1. Users send requests

An architecture diagram showing a user request generation.

AWS Cloud Technology and Services Concepts

How does auto-scaling work?

  1. Users send requests
  2. The requests are routed to EC2 Auto Scaling service

An architecture diagram showing a user request hitting an EC2 Auto Scaling service.

AWS Cloud Technology and Services Concepts

How does auto-scaling work?

  1. Users send requests
  2. The requests are routed to EC2 Auto Scaling service
  3. The service then routes requests to the active EC2 instances

An architecture diagram showing a user request hitting an EC2 Auto Scaling service and getting divided to EC2 instances.

AWS Cloud Technology and Services Concepts

How does auto-scaling work?

  1. Users send requests
  2. The requests are routed to EC2 Auto Scaling service
  3. The service then routes requests to the active EC2 instances
  4. If demand increases, it starts adding new EC2 instances to manage the additional load

An architecture diagram showing multiple user requests hitting an EC2 Auto Scaling service and getting divided to active and backup EC2 instances.

AWS Cloud Technology and Services Concepts

How does auto-scaling work?

  1. Users send requests
  2. The requests are routed to EC2 Auto Scaling service
  3. The service then routes requests to the active EC2 instances
  4. If demand increases, it starts adding new EC2 instances to manage the additional load
  5. As demand goes down, the newly added EC2 instances are shut down

An architecture diagram showing a user request hitting an EC2 Auto Scaling service and getting divided to EC2 instances.

AWS Cloud Technology and Services Concepts

Load balancing vs. auto-scaling

Load balancing

  • Route traffic evenly
  • Utilize existing EC2 instances

An icon showing AWS Load Balancer.

Auto-scaling

  • Ensure demand is always met
  • Ability to add/remove EC2 instances

An icon showing EC2 Auto Scaling.

AWS Cloud Technology and Services Concepts

Let's practice!

AWS Cloud Technology and Services Concepts

Preparing Video For Download...