Microsoft Azure has various service, which can use to load balance your application traffic at the global level or regional level. Azure Front Door is also one of those services.
- Traffic Manager
- Application Gateway
- Load Balancer
Traffic Manager, is a DNS based traffic load balancer. It examines the incoming DNS request and replies according to traffic routing rules.
Application Gateway is a layer 7 load balancer which can make routing decisions based on the attributes of an HTTP request (URL based routing).
load balancer works in layer 4 (transport layer) and can distribute network traffic to endpoints in the same Azure region. It can use to distribute internet traffic as well as internal traffic.
Azure Front Door also a solution that can use for Global load balancing. It also works in layer 7 and it can provide dynamic website acceleration (DSA) to globally distributed applications. It examines incoming HTTP requests and route traffic to the closest back end based on availability and configuration rules. Azure front door can offer,
- Accelerated application performance by using split TCP-based anycast protocol
- Intelligent health probe monitoring for backend resources
- URL-path based routing for requests
- Enables the hosting of multiple websites for efficient application infrastructure.
- Cookie-based session affinity
- SSL offloading and certificate management
- Define your custom domain
- Application security with integrated Web Application Firewall (WAF)
- Redirect HTTP traffic to HTTPS with URL redirect
- Custom forwarding path with URL rewrite
- Native support of end-to-end IPv6 connectivity and HTTP/2 protocol
In this blog post, I am going to demonstrate how to set up Azure Front door and show how we can use it for application load balancing.
For the configuration process, I will be using PowerShell. Therefore, please make sure you have an Azure PowerShell module installed. More info about it can find under https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-3.8.0
Create New Azure Resource Groups
First, I am going to create two resource groups in Azure. One is in East US region and another one is UK South region. To do that,
1. Launch PowerShell console and connect to Azure using Connect-AzAccount
2. Then create new resource groups using,
New-AzResourceGroup -Name REBELRGEUS -Location “East US”
New-AzResourceGroup -Name REBELRGUKS -Location “UK South”
In here, we are creating two resource groups. The first one is called REBELRGEUS and it is created in East US Azure region.
The second group is called REBELRGUKS and it is created in UK South azure region.
Create Azure Web Applications
The next step of the configuration is to create two applications in these new resource groups. For that, I followed https://docs.microsoft.com/en-us/azure/app-service/quickstart-html and create two new Azure web applications.
East US Site
UK South Site
Create Azure Front End Object for Azure Front Door
We need a hostname for Azure Front Door. Then, users can access it from the internet. To do that we need to create Azure frontend object first.
$afd = “rebeladminapp-frontend-$(Get-Random)”
$feobject = New-AzFrontDoorFrontendEndpointObject -Name “rebelfrontend1″ -HostName $afd”.azurefd.net”
In here, New-AzFrontDoorFrontendEndpointObject command is used to create a new frontend object called “rebelfrontend1“. Also, in their rebeladminapp-frontend-$(Get-Random) value defines the hostname prefix.
In next step of the configuration, We are going to create a backend pool. [Read more…] about How to use Azure Front Door for Global load balancing?