Hi Arunansu , have you already enabled health check in the azure portal? if no, then set that up first by following the below steps:
- To enable Health check, browse to the Azure portal and select your App Service app.
- Under Monitoring, select Health check.
- Select Enable and provide a valid URL path on your application, such as
/health
or/api/health
the path /wwwroot/wp-admin/site-health.php path you created via the WP plugin - Select Save.
According to the docs: "When given a path on your app, Health check pings this path on all instances of your App Service app at 1-minute intervals. If an instance doesn't respond with a status code between 200-299 (inclusive) after 10 requests, App Service determines it's unhealthy and removes it. (The required number of failed requests for an instance to be deemed unhealthy is configurable to a minimum of two requests.)
After removal, Health check continues to ping the unhealthy instance. If the instance begins to respond with a healthy status code (200-299) then the instance is returned to the load balancer. If an instance remains unhealthy for one hour, it will be replaced with new instance. When scaling out, App Service pings the Health check path to ensure new instances are ready."
Hope that helps.