top of page
  • Writer's pictureParag

AWS Classic Load Balancer

Updated: Feb 28

Create a Classic Load Balancer


Step 1: Create two Web Servers using the bootstrap script as follows:

  • Provision a web server on Linux instance with bootstrapping script. Refer to the document EC2 linux webserver.

  • Create these 2 Web Servers in 2 different Availability zones

  • Add Name tag to both the servers respectively:

  • E.g. WebServer1 and WebServer2

  • Check whether both the servers are running by running the IPv4 or DNS Name in browser.

Step 2: After creating two Web Server’s instances go to Load Balancers under Load Balancing Tab.

  • Click on create Create Load Balancer

  • Click on Create under Classic Load Balancer

Elastic Load Balancer Types

Step 3: Define Load Balancer

Basic Configuration:

  • Provide Load Balancer name as MyLoadBalancer

  • Let everything be default except tick the checkbox for Enable advanced VPC configuration.

Select Subnet :

  • Select the two Subnets in which the two web servers were created.


Step 4: Assign Security Groups

  • Select the existing Web Server security group created while provisioning EC2 Linux Webservers.

Step 5: Let the defaults for Configure Security Settings be as it is and continue to Configure Health Check Up

  • Configure the values as given below


Step 6: The table lists all your running EC2 Instances. Check the boxes in the Select column to add your Web Server instances to this load balancer.


Step 7: Add a Name tag as MyLB


Step 8: Continue to Review and Create the load balancer.


Step 9: Now we check how this load balancer works:

  • Go to Load Balancers under Load Balancing Tab.

  • Select your load balancer. Now click on Instances tab and check if both the instances are in service.


Step 10: Implementation of this load balancer:

  • Under Description copy the DNS name till ‘.com’ and open that URL in a different browser window.

  • Every time you refresh it, alternatively each web server is observed to work.

  • The understanding here is that user requests load is balanced by the Load Balancer between both the Web Servers.

Was this document helpful? How can we make this document better. Please provide your insights. You can download PDF version for reference.

EC2_CLB
.pdf
Download PDF • 652KB


29 komentarzy


Helpful.

Polub

useful

Polub

easy to understand

Polub

Very Helpful

Polub

Poonam Singh
Poonam Singh
01 paź 2023

very helpful and descriptive blog about load balancer

Polub
bottom of page