Friday, 24 May 2019

How To Distribute traffic between more then one server by using Application Load Balancer By Raj Gupta




Use the following procedure to create a Application Load Balancer :-

1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
2. On the navigation pane, under LOAD BALANCING, choose Load Balancers.
3. Choose Create Load Balancer.
4. For Application Load Balancer, choose Create


5. On the Configure Load Balancer page, do the following:

  • For Name, type a name for your load balancer. For example, my-lb. 
  • For Scheme, keep the default value, internet-facing. 
  • For Listeners, keep the default, which is a listener that accepts HTTP traffic on port 80. 
  • For Availability Zones, select the VPC that you used for your instances. Select an Availability Zone and then select the public subnet for that Availability Zone. Repeat for a second Availability Zone. 
  • Choose Next: Configure Security Settings.


Now use the exiting or create new security group that allows traffic to the port configured for the listener(port 80) then Choose Next: Configure Routing



On the Configure Routing page, do the following: 
  • For Target group, keep the default, New target group. 
  • For Name, type a name for the target group. 
  • Keep Protocol as HTTP, Port as 80, and Target type as instance. 
  • For Health checks, keep the default protocol and path. 
  • Choose Next: Register Targets.




On the Register Targets page , Register all the EC2 server on which you want to do load balance 




On the Review page, choose Create



After load Balancer is created use the load Balancer DNS name to test 

No comments:

Post a Comment