Hello @prasantc ,
Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.
I understand that you would like to know how to test if the application gateway is routing the traffic to the backend web app properly.
First of all, I would like to clarify the use of DNS change or host file entry usage for Application gateway.
- If you are using a Basic listener and accessing your Application gateway using it's IP address, then you don't need to add any host file entry or make any DNS changes. You can access the application using the IP address directly and it should work as long as the backend is available and the probes are successful.
- If you are using a multi-site listener with a hostname and accessing your Application gateway using that hostname, then you need to make DNS changes or add a host file entry pointing that hostname to your Application gateway's IP address.
Coming back to your question on how to test if the application gateway is routing the traffic to the backend web app properly, you can check this in 2 places:
- health probe test
- backend health of your Application gateway.
When a backend server can receive traffic, the probe is successful and considered healthy. Otherwise, it's considered unhealthy. The precise representation of the health probes report is also made available for your consumption through the Backend Health capability.
The Backend health report is updated based on the respective probe's refresh interval and doesn't depend on the moment of page refresh or Backend health API request.
Refer: https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-backend-health
https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-probe-overview
Additional references for you:
Kindly let us know if the above helps or you need further assistance on this issue.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.