LAUNCHING AUTO SCALING GROUPS BEHIND A CLASSIC LOAD BALANCER

Auto Scaling helps you maintain application availability and allows you to scale your Amazon EC2 capacity up or down automatically according to the defined conditions. You can use Auto Scaling to help ensure that you are running your desired number of Amazon EC2 instances. Auto Scaling can also automatically increase the number of Amazon EC2 instances during demand spikes to maintain performance and decrease capacity during lulls to reduce costs. Auto Scaling is well suited to applications that have stable demand patterns, or that experience hourly, daily, or weekly variability in usage.

Elastic Load Balancing (ELB) allows the distribution of incoming traffic to your Amazon AWS infrastructure across multiple instances. This represents a great tool in avoiding failures in your applications and web traffic. ELB automatically detects failures in your EC2 instances and redirects traffic to other available instances. 

During this lab, we will launch an Auto Scaling Group (ASG) behind a Classic Load Balancer, we will build everything from scratch, in the end of this lab we should have an infrastructure that looks like this:

 

We will create Classic Load Balancer to load balance the traffic to the instances that will be launched in the Auto Scaling group that we will also create. We will follow the security best practices by denying direct access for the EC2 instances by allowing requests coming only from the Load Balancer.

To make sure that our application scales, we will configure some Scaling Policies to scale the infrastructure up and down based on the usage, to do so, we will create a couple of CloudWatch Alarms to monitor a particular metric and trigger the scaling actions.

 

  

Pre-requisites:

This is an intermediate level Lab, in order to follow the next steps you should be able to:

 

If you don't have this knowledge, please refer to these labs first:

 

Learning Objectives:

By the end of this lab you should be able to:

Follow these steps to learn by building helpful cloud resources

Log In to the Amazon Web Service Console

Your first step to start the laboratory experience

Creating a Classic Load Balancer

This step will guide you through the process of creating a Classic Load Balancer

Create a launch configuration

In this step, we will define a few concepts, identify the goal for the lab, and start creating a launch configuration in the AWS console.

Create an Auto Scaling Group associated with an ELB

In this step, we will create the Auto Scaling group

Creating scaling policies

In this step, we will create a couple of scaling policies to manage how the Auto Scaling group will scale up or down

Making it scale

In this step, we will see the scaling policies we created in action