AWS Networking contd
- Proxy Server: This server is used to filter out all the outbound network traffic

- Reverse Proxy Server: This server is used to forward the incoming traffic to the application

- Load Balancers: These servers distribute the traffic equally to servers

Load Balancer
- to ensure the request is forwarded only to servers which are responding, load balancers perform health checks
-
Load Balancer is of two types
- Layer 4 load balancer:
- Layer 4 in osi knows about ip, port, protocol
- Layer 7 Load Balancer
- Layer 7 in osi knows about http, ip, port, protocol, sessions
- Layer 4 load balancer:
Load Balancers in AWS
- AWS has 3 load balancers
- Classic Load Balancer: can perform layer 4 and layer 7 lb. This is no longer recommended and is present in aws for backword comptability.
- Network Load Balancer: This performs layer 4 load Balancing
- Application Load Balancer: This performs layer 7 load Balancing.
- NLB in AWS

-
ALB in AWS
- Try coming up 5 points about layer 4 vs layer 7 load balancing
Lab Setup
Layer 4 Loadbalancing setup
- Create an ubuntu ec2 instance with public ip
- login into ubuntu
sudo -i
apt update
apt install apache2 -y
echo "<h1> Web Server For testing </h1>" > /var/www/html/info.html
- Access
http://<public-ip>/info.html - Create an AMI with name webserver
Layer 7 loadbalancing
- Create an ubuntu ec2 with public ip
- login into ubuntu
sudo -i
apt update
apt install apache2 -y
mkdir /var/www/html/orders
echo "<h1> Orders Server For testing </h1>" > /var/www/html/orders/info.html
- Access
http://<public-ip>/orders/info.html - Create an AMI with name ordersserver
- Create an ubuntu ec2 with public ip
- login into ubuntu
sudo -i
apt update
apt install apache2 -y
mkdir /var/www/html/admin
echo "<h1> Admin Server For testing </h1>" > /var/www/html/admin/info.html
- Access
http://<public-ip>/admin/info.html - Create an AMI with name adminserver
