Design and implement a health check
--
In this post, I will share my study notes that I took while preparing for the exam Azure AZ400 “Design and implement a health check”.
Health monitoring can allow near-real-time information about the state of your containers and microservices. Health monitoring is critical to multiple aspects of operating microservices and is especially important when orchestrators perform partial application upgrades in phases, as explained later.
The primary focus of health monitoring is to quickly indicate whether the system is running. Hot analysis of the immediate data can trigger an alert if a critical component is detected as unhealthy. (It fails to respond to a consecutive series of pings, for example.) The operator can then take the appropriate corrective action.
Analyze system dependencies to determine which dependency should be included in health check
Analysing dependencies used to be hard.
It used to take a lot of time for a developer to get familiar with the flow of application requests across different microservices. Even then, tracking requests when fixing a bug could be a stellar headache.
Azure provides a great service inside Azure Monitor Insights that helps with that: Application Map. In this article, I will walk through how to set it up and it works.
Deploy on Azure
I have deployed three web APIs on three App Services. Each separate App Service will be instrumented and linked to a different Azure Application Insight.
Application Map is available with runtime instrumentation, it only relies on the capability of the webserver to produce telemetry. The only thing that will be needed is to enable application insight into the app service page.