How to Create Application load balancer on Amazon Web Service(AWS).

A load balancer serves as the single point of contact for clients. The load balancer distributes incoming application traffic across multiple targets, such as EC2 instances, in multiple Availability Zones. This increases the availability of your application. You add one or more listeners to your load balancer.

Elastic Load Balancing supports the following types of load balancers: Application Load Balancers, Network Load Balancers, and Classic Load Balancers. Amazon ECS services can use either type of load balancer. Application Load Balancers are used to route HTTP/HTTPS (or Layer 7) traffic.

 

  • Login to aws portal.
  • Click on Services.

 

Fig 1

 

  • Under Compute select EC2.

 

Fig 2

 

  • Click on load balancers.

 

Fig. 3

 

  • Click on Create Load Balancer.

 

Fig. 4

 

  • Four types of load balancer :application, network, classic and gateway load balancer.
  • Select Application load balancer.
  • Click on Create.

 

Fig. 5

 

  • Provide load balancer name.
  • Select Scheme like internet-facing or internal.
  • An Internet-facing load balancer routes requests from clients over the Internet to targets.
  • An internal load balancer routes requests from clients to targets using private IP addresses.
  • Provide IP address type. The IP addresses used by subnets either IPv4 (ipv4) or IPv6 (dualstack).
  • Select Listeners like HTTP or HTTPs.

 

Fig. 6

 

  • Select default or existing VPC & availability zone.

 

Fig. 6

 

  • Click on Tags.

 

Fig. 7

 

  • Provide key name & value for application load balancer.
  • Then click on Next Configure Security settings.

 

Fig. 8

 

  • Click on Next configure security groups.

 

Fig. 8

 

  • Create or select existing security group.
  • We can add multiple rules as per requirements.
  • Click on Next configure Routing.

 

Fig 9

 

 

Fig 10

 

  • Select Both running instance.

 

Fig 11

 

  • Click on Add to registered on port number 80.

 

Fig 12

 

  • Both instance is ready for load balancer.
  • Click on Next Review.

 

Fig 13

 

  • Review all load balancer configuration.
  • Then click on Create

 

Fig 14

 

  • Load balancer created successfully.
  • Click on close then go to load balancer console page.

 

Fig 15

  • After sometime load balancer will be ready (provisioning state to active statue).
  • Then copy the DNS of load balancer & paste on browser tab, If everything is working then browser will displays web page of servers.

 

Fig 16

 

Create Load balancer using Shell

  1. To create an Internet-facing load balancer.

                    aws elbv2 create-load-balancer –name  load-balancer-name –subnets subnet-id subnet-id

2.To create an internal load balancer.

aws elbv2 create-load-balancer –name internal-load-balancer-name –scheme internal –subnets subnet-id subnet-id

 

 

Leave a Reply

Your email address will not be published.