Configuration of Azure Application GW Load-Balancing

Required

  • 1 virtual networks
  • 1 Scale Set
  • 2 subnets
  • HTTP server running on both VMs

TCP/IP addressing table

Subnet nameIPv4 range
BLUEVNET Virtual Machines subnet range172.16.100.0/24
BLUEVNET Application Gateway subnet range172.16.200.0/24
NodeIPv4 Address
WEB-SERVER 0LAN 172.16.100.4/24
WAN 52.235.20.35
WEB-SERVER 1LAN 172.16.100.5/24
WAN 20.220.68.16
APPGWLAN 172.16.200.10/24
WAN 52.229.110.179
  • Create the APP. GW. from the portal.azure.com
    1. Search for Application Gateways and select Create
    2. On the Basics page configure the following info , and hit Next ;
      • Subscription
      • Ressource group
      • Virtual Network
      • Subnet
    3. On the Frontend page configure the following info, and hit Next
      • Frontend IP address type
      • Public IP address
      • Select Yes on Use a private IP address
      • Input the application gateway static Virtual Network IP address
    4. On the Backend page click Add backend pool and configure the following info and hit Next
      • Name
      • Add VMSS Select your VMSS target
    5. Click on the Add routing rule plus sign and configure the following info and hit Next
      • On the Listener page configure the following info
        • Name
        • Listener Name
        • Frontend IP
        • Protocol
        • Port
        • Listener Type
        • Error page url
        • Single Site
        • No URL path-based routing
      • On the Backend targets page configure the following info
        • Backend type pool
        • Backend target click on Add New under Backend Setting
          • Name your backend settings and leave defaults click Add
  • Review and create

You can now access both web servers from the Application Gateway Public URL. Try turning off one of them and see ! By default it uses round-robin when both are running.

Configuration of Azure Virtual Network Peering

Required

  • 2 virtual networks
  • 2 virtual machines in each subnets

TCP/IP addressing table

BLUEVNET subnet range172.16.100.0/24
REDVNET subnet range192.168.100.0/24
BLUEVNET-SERVER172.16.100.4/24
REDVNET-SERVER192.168.100.4/24
  • Create the peering from the portal.azure.com
    1. From Virtual Network select BLUEVNET
    2. From the menu select Peering and click Add
  • Configure the connection
    1. Input Peer Link Name BLUEVNET_2_REDVNET on this virtual network
    2. Leave the defaults traffic rules
    3. Input Input Peer Link Name BLUEVNET_2_REDVNET on remote virtual network
    4. Select the remote virtual network REDVNET
    5. Leave the defaults traffic rules and click Add
  • Peering is configured