I have two VMs which are configured in backend pool as target and this backend pool along with http setting connected to rule which is of type "Basic".
Java based application is running on both of these virtual machines. Domain name is mapped with public ip of Application Gateway which I am using to browse the web interface of application.
When I forcefully shutdown the service in any of virtual machine it shows "502 Bad Gateway".
It keeps showing me the error until I close the browser and revisit the url.
It seems like application gateway is not redirecting the traffic to other vm if one node is down.
Please be informed that it shows "unhealthy" status in "Backend Health" because it's not receiving success http status code.
Please let me know if you required any further information.