Hi @Shivaji Chate,
Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.
I did a lab at the end and tested this scenario. I created two App Services and added them behind Front Door. Then, I stopped one of the App Services. I am also facing the same issue—traffic did not go to the healthy origin; instead, it redirected to the unhealthy origin.
I resolved this issue by setting the latency sensitivity property to 0
The latency sensitivity property is by default set to 0, which means that the request will always be forwarded to the fastest backend.
Is there a way to customize the status codes that AFD considers for backend health?
No, It's not possible
Refer this document: https://learn.microsoft.com/en-us/azure/frontdoor/health-probes#health-probe-responses
I hope this has been helpful!
Your feedback is important so please take a moment to accept answers. If you still have questions, please let us know what is needed in the comments so the question can be answered.
Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.