๐ถ What is Load Balancing?
Load balancing is the distribution of workloads across multiple servers to ensure consistent and optimal resource utilization. It is an essential aspect of any large-scale and scalable computing system, as it helps you to improve the reliability and performance of your applications.
๐ถ Elastic Load Balancing:
Elastic Load Balancing (ELB) is a service provided by Amazon Web Services (AWS) that automatically distributes incoming traffic across multiple EC2 instances. ELB provides three types of load balancers:
Read more here
- Application Load Balancer (ALB) - operates at layer 7 of the OSI model and is ideal for applications that require advanced routing and microservices.
- Read more here
- Network Load Balancer (NLB) - operates at layer 4 of the OSI model and is ideal for applications that require high throughput and low latency.
- Read more here
- Classic Load Balancer (CLB) - operates at layer 4 of the OSI model and is ideal for applications that require basic load balancing features.
- Read more here
๐ถ Task 1: Launch 2 EC2 instances with an Ubuntu AMI and use User Data to install the Apache Web Server.
1. Launch 2 EC2 instances.
Add User Data to install the Apache Web Server in Advance details.
Now verify your both instances are running.
Now connect with SHH and Apache web server is installed or not.
Modify the index.html file to include your name so that when your Apache server is hosted, it will display your name Also do it for 2nd instance which includes " TrainWithShubham Community is Super Awesome :) ".
For Instance 1:
Modifyindex.html
by using the root usersudo su
andcd /var/www/html
For Instance 2:
Modifyindex.html
which includes " TrainWithShubham Community is Super Awesome :) "Copy the public IP address of your EC2 instances.
Instance 1 :Instance 2:
Open a web browser and paste the public IP address into the address bar.
You should see a webpage displaying information about your PHP installation.
๐ถ Task 2: Create an Application Load Balancer (ALB) in EC2 using the AWS Management Console
Create a target group.
Add both instances to the group and click on create target group.
Add EC2 instances that you launch in task-1 to the ALB as target groups.
Now create a load balancer.Configure VPC Network mapping.
Select a target group.
Now go target group and select Register targets Check your instances.
Verify that the ALB is working properly by checking the health status of the target instances and testing the load-balancing capabilities.
Happy Learning! ๐
Stay in the loop with my latest insights and articles on cloud โ๏ธ and DevOps โพ๏ธ by following me on Hashnode, LinkedIn (https://www.linkedin.com/in/chandreshpatle28/), and GitHub (https://github.com/Chandreshpatle28).
Thank you for reading! Your support means the world to me. Let's keep learning, growing, and making a positive impact in the tech world together.
#Git #Linux Devops #Devopscommunity #90daysofdevopschallenge #python #docker #Jenkins #Kubernetes #AWS