Azure Networking contd
- Proxy Server: This is used to filter out the outbound traffic from your network to external
- Reverse Proxy: This is used to route/forward the inbound traffic into your servers
- Load Balancer aim is to distribute traffic so that one server is not overloaded.
- Load Balancers perform health checks
- Load Balancers work at two layers
- Layer 4 Load Balancer:
- This load balancer can forward the traffic based on port, ip address, protocol
- Layer 7 Load Balancer: This load balancer operates on layer 7 i.e. it has knowledge of ip,port,protocol, url
- Path Based Routing
- Host Name based routing
- Layer 4 Load Balancer:
- Azure Load Balancer: This is a service from azure to perform layer 4 load balancing
- Azure Application Gateway: This is a service from azure to perform layer 7 load balancing
Lab Environment Setup
Layer 4 load Balancing
- Create a vnet with two subnets
- web
- app
- Create 2 ubuntu vms in web
- install apache server
sudo apt update
sudo apt install apache2 -y - create a html page
echo "<h1> Web </h1>" > /var/www/html/info.html
- install apache server
- Create 2 ubuntu vms in app
- install apache server
sudo apt update
sudo apt install apache2 -y - Create a html page
echo "<h1> app </h1>" > /var/www/html/info.html
- install apache server
Layer 7 Load Balancing
- Create a network with two subnets app and admin
- Create two vms in app subnet
sudo apt update
sudo apt install apache2 -y
sudo mkdir /var/www/html/app
echo "<h1> app </h1>" > /var/www/html/app/info.html
- Create two vms in admin subnet
sudo apt update
sudo apt install apache2 -y
sudo mkdir /var/www/html/admin
echo "<h1> admin </h1>" > /var/www/html/admin/info.html