Sunday, September 25, 2016

NET702 - Lab 8: Using ELB to Scale Applications

Elastic Load Balancer (ELB)

ELB is used to balance the load of the application by distributing the traffic to multiple instances. It also helps to achieve fault tolerance for the application.Elastic Load Balancing automatically scales its request handling capacity in response to incoming traffic. In this lab, we are implementing ELB among the two web servers which we have created in the previous lab and checking the functionalities.

To start configuration go to the AWS EC2 dashboard, choose ‘Load Balancers’. Then I have created a load balancer with the name 'DinoStoreLB'.

We can use security group same as the web server  because it allows the same port in that the load balancer is going to use: port 80.



Then we are configuring health check as ping protocol TCP and port 80. The ELB will detect unhealthy instances and reroutes traffic to healthy instances until the unhealthy instances have been restored.



Then we have to select the instances for the load balancing, here I am selecting the two web servers.


Then given a tag for the ELB.


Review and creating the ELB.



After creating the load balancer I have copied the load balancer DNS name and copy it into your local browser tab with my website name. It opened the website with the private IP of my first web server. 



To ‘test’ the load balancer repeatedly refreshes the browser page from above and noted the internal IP address of the server changed to the second server.


I have also tried removing one of the instances from the load balancer, then refresh the browser page repeatedly.  Then the internal IP address doesn’t change anymore.











No comments: