Create Load Balancer for Rails Project

This article is the continuation of Rails + Sidekiq + Docker Application for AWS (ECS, ECR, RDS, Codepipeline and more) complete series. For better understating, please start from the beginning of the series.

Create Load Balancer

In this article, we will create the Load Balancer which will sit on top on Rails instances and balance the load as per increasing the requests from users. The ultimate reason for this approach is to make your website scalable and always available for our clients.

From EC2 console Select Load Balancer and click on Create Load Balancer

On this step, select HTTP/HTTPS

This image has an empty alt attribute; its file name is 003-5-1024x326.png

Step: Configure Load Balancer and VPC

Make sure you select the correct VPC on this step.

Step: Configure Security Groups

On this step, we will use the Security Group we created earlier for our Load Balancer.

Step: Configure Routing (Target Group)

Target Group’s job is to ping your instances periodically to make sure that they are healthy. If it does not receive the response from any of the instance, it raises the alarm and the instance is marked as unhealthly by the Load Balancer and an action will be taken accordingly.

Ladies and gentlemen, we have created our Load balancer and Target Group which we will use very soon. Yeayyyyyy !!!!

Written by

Leave a Reply

Your email address will not be published. Required fields are marked *