AWS Load Balancing, File Migration
It distributes incoming application traffic across multiple targets
Creating and Connecting to EC2 instances (2)
- Creating two Amazon Linux Instance
- Select a machine β Click connect β Copy given example β write in git bash
- Install
httpd
web serveryum install httpd
- Check status of server
systemctl status
systemctl start httpd
- Go to
www
directory and changeindex.html
cd /var/www/html/
echo "This is First Server" > index.html
- DO THE SAME FOR SECOND SERVER
Load Balancing
Create group and attach machines to it
- Load Balancing β Target Groups β Create target groups
- Target type: Instances
- Give Target group name, Protocol, IP address type, VPC, Protocol version
- Configure Health Check settings
- Select both servers and click
Include as pending below
βCreate Target Group
Creating Load Balancers
Types of Load Balancer:
- Application - works on layer 7
- Network - works on layer 3
- Gateway
- Classic
Steps:
- Click on load balancer in side bar β create load balancer
- Application Load Balancer β Name it β Network Mapping β Security Groups β Listeners and routing β Summary β Create Load Balancer
- Copy DNS Name and write in browser
http://lb1amazonlinux-1771573453.ap-south-1.elb.amazonaws.com/
- Check health of machines
File Migration
Same can be done for images, pdfs