1 / 25

www_devopscheetah_com_create-loadbalancer-in-aws_

An ELB is a software-based load balancer which can be set up and configured in front of a collection of AWS Elastic Compute (EC2) instances. The load balancer serves as a single entry point for consumers of the EC2 instances and distributes incoming traffic across all machines available to receive requests.

Atulr
Download Presentation

www_devopscheetah_com_create-loadbalancer-in-aws_

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DevOpsCheetah Home Linux Cloud  Programming  Monitoring  CI/CD  Categories  Create LoadBalancer in AWS  June 2, 2021  Atul Rajput  0 Comment Today we are going to learn “How to create LoadBalancer in AWS” An ELB is a software-based load balancer which can be set up and configured in front of a collection of AWS Elastic Compute (EC2) instances. The load balancer "Cookie Settings" to provide a controlled consent. We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit Cookie Settings Accept All

  2. serves as a single entry point for consumers of the EC2 instances and distributes incoming traffic across all machines available to receive requests. AWS has three types of load balancer:- 1. Classic Load Balancer (This is previous generation load balancer) 2. Network Load Balancer (This load balancer is used to low latency because it works on layer 4) 3. Application Load Balancer (This load balancer works on layer 7) Now we are going to create ELB (Elastic Load Balancer) in AWS In the previous blog, we described “How to create an EC2 instance”, please follow this link https://www.devopscheetah.com/how-create-an-ec2-instance-on-aws/ But we need minimum two instances and two subnets for load balancer to divide or balance the load. Scroll down the left side slider you will see the load balancer and target group.

  3. First we have to create target group in which we define the instances for the load balancer. Click on Target groups.

  4. Now click on create Target Group Define the details Target Group Name = EMT-TG (Appropriate Name) Target Type = Instance (which we want to target) Protocol = HTTP (we are working web app) VPC = EMT-VPC (define the VPC) Health check settings Protocol = HTTP (define the protocol as per the requirements) Path = / (If you want define another page we can define)

  5. Click on create and your target group is created

  6. Now click on the targets and define those instances which you want to add Now click on the edit and select instances and click on add to register

  7. After clicking on add, you will see those instances in registered targets on the top,

  8. Now click on save and you will see this image Now click on load balancer and create Load balancer

  9. Now click on create load balancer and select “Application load balancer” You will get this image

  10. Define the details Name = EMT-ELB (load balancer name) Scheme = Internet-facing (where you want to balance load through internet or internally) IP address type = IPv4 Listener = HTTP (HTTP for non secure or HTTPS for secure) VPC = EMT-VPC AZ= define the subnet with AZ Now click on next Configure security settings, you will see this message

  11. Because we are working on HTTP not HTTPS. Click on Next Configure Security Groups

  12. You can create new or select existing security group for security point of view create another security- group for ELB. But we are using existing groups. Now click on configure Routing and you will see this image

  13. Define all these details Target Group = select existing group Name = EMT-TG After this it will select all the details automatically which we defined in the target group. Now click on Register Targets and you will see this screen

  14. Now click on next: Review Now click on create and finally your load balancer is created.

  15. Now we will login in an instance via gitbash-tool, This is the git bash terminal

  16. Now we have to log-in to instance Run this command ssh -i Downloads/EMT-TOK.pem centos@ ssh -i key-pair location(Downloads/EMT-TOK.pem) centos(user)@public-ip(54.199.190.114)

  17. Now you will get login prompt

  18. Run this command (su -i) convert centos user to root user. su -i After this install httpd service yum install –y httpd

  19. When successfully installed run these command systemctl start httpd systemctl enable httpd after this edit welcome.conf file (This is default welcome file of HTTP(Appache) location of welcome.conf file                                                       /etc/httpd/conf.d/welcome.conf run this command to edit the file vi /etc/httpd/conf.d/welcome.conf

  20. Insert # before the lines (comment all line)

  21. Now create your own html file under this directory (/war/www/html/) vi /war/www/html/emt.html Now add a line in the file “ WELCOME TO EMT” and save it. Restart the httpd service Systemctl restart httpd Note:- Do the same things in another instance. Again go to load-balancer and copy the dns name

  22. Go to google and run the dns name.

  23. Enter that url and get result Now your load balancer is ready and working is fine, if you face any issues please let us know ? . If you want learn “How to create an EC2 instance” please click on link given below:- https://www.devopscheetah.com/how-create-an-ec2-instance-on-aws/   Tags: AWS loadbalancer , Classic loadbalancer in AWS , Loadbalancer in AWS Leave a Reply

  24. Your email address will not be published. Required fields are marked * Comment Name * Email * Website Save my name, email, and website in this browser for the next time I comment. POST COMMENT  Previous Post Next Post 

  25. Related Posts    Blogs About Us Contact Us Privacy Policy © 2021. DevOpsCheetah.com PDFmyURL.com - convert URLs, web pages or even full websites to PDF online. Easy API for developers!

More Related