Azure Front Door
is in simple a Front Door to all your applications. Once a request is entered
through Front Door, it travels through Microsoft's global edge network.
It has many capabilities, but in this post, we are going to have a look at how
easy it is to set up Health Probe Monitoring in Azure Front Door and how Azure
Front Door handles unhealthy Backends.
As always it's easy to go by a demo.
I have deployed a very simple web application as an Azure App Service in two
regions, one in Australia Southeast and the other in East US 2.
(I am using 2 regions because Front Door is resilient to failures to an
entire Azure region unlike Azure Application Gateway). This web application
exposes /health endpoint, which the Azure Front will use to monitor the
health.
And I have an Azure Front Door created and added a single backend pool with my
two App Services.
|
Update Backend Pool |
For my backends, their priority and weight are configured to be equal. Since I am in New Zealand, the closest region to me out of my two regions is Australia Southeast. So when I access the Front Door, I will be served
from my App Service running in Australia Southeast (Read more: Front Door routing methods)
|
Served from Australia Southeast |
And for some reason, if my App Service in Australia Southeast is down (can
be an Application issue or can be a serious issue like Azure App Services
in Australia Southeast region is down) and then I will be served from a different backend (determined by
Front Door routing methods)
|
Served from East US 2 |
All these are handled by Azure Front Door with the very little configuration
I have shown above (highlighted in red and green in the first image).
To determine the health and proximity of each backend, the Front Door
periodically sends an HTTP/HTTPS request (health probe) to the specified path in each of
your configured backends. This request can be either a GET or HEAD (HEAD is
preferred due to less overhead) request. We can change the frequency Front Door do the health probe (for the demo purpose, I have set it to 5 seconds)
Then it considers the response status and the latency. A 200 OK status code indicates the backend is Healthy.
Everything else is considered a failure. If it doesn't get any response it's
counted as a failure. So for my active backends, Front Door looks at the last n health probe responses. If at least x are healthy, the backend is considered healthy. Here n is the Sample size and x is Successful samples required property in load-balancing settings.
Read More:
Hope this helps.
Happy Coding.
Regards,
Jaliya
No comments:
Post a Comment