Hello @dnyandeo bharambe ,
Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.
I understand that you want to deploy your application with georedundancy which has multiple http endpoints & multiple services and would like to know how to achieve application failover with Azure Front Door where it should redirect to secondary environment, in case of a failure in the primary environment.
Azure Front Door supports four different traffic routing methods to determine how your HTTP/HTTPS traffic is distributed between different origins. The four traffic routing methods are: Latency, Priority, Weighted & Session Affinity.
Refer : https://learn.microsoft.com/en-us/azure/frontdoor/routing-methods
The Priority traffic-routing method in Azure Front Door allows you to easily implement the Active/Standby or Active/Passive deployment failover pattern which provides high availability for your services by deploying more than one backup service in case the primary one goes down.
The default Azure Front Door contains an equal priority list of origins. By default, Azure Front Door sends traffic only to the top priority origins (lowest value in priority) as the primary set of origins. If the primary origins aren't available, Azure Front Door routes the traffic to the secondary set of origins (second lowest value for priority). If both the primary and secondary origins aren't available, the traffic goes to the third, and so on. Availability of the origin is based on the configured status of enabled or disabled and the ongoing origin health status as determined by the health probes.
To determine the health and proximity of each backend for a given Azure Front Door environment, each Front Door environment periodically sends a synthetic HTTP/HTTPS request to each of your configured origins. Azure Front Door then uses these responses from the probe to determine the "best" origin to route your client requests.
A 200 OK status code indicates the backend is healthy. Everything else is considered a failure.
Refer : https://learn.microsoft.com/en-us/azure/frontdoor/health-probes
Each origin (backend in AFD Classic) in your origin group (backend pool in AFD Classic) of the Azure Front Door configuration has a property called Priority, which can be a number between 1 and 5. With Azure Front Door, you can configure the origin priority explicitly using this property for each origin. This property is a value between 1 and 5. The lower the value the higher the priority. Origins can share the same priority values.
Refer : https://learn.microsoft.com/en-us/azure/frontdoor/routing-methods#priority
For a Multi-region active/passive deployment: You need to create a single origin group (backend pool in case of Azure Front Door Classic). Within that origin group, create an origin (backend in AFD Classic) for each of the App Service apps. Configure each origin's priority to ensure that the primary application has a higher priority than the secondary application.
Refer : https://learn.microsoft.com/en-us/azure/frontdoor/front-door-faq#how-many-origins-and-origin-groups-should-i-create-
https://learn.microsoft.com/en-us/azure/frontdoor/origin?source=recommendations&pivots=front-door-classic
Architecture setup for Azure Front Door failover : https://learn.microsoft.com/en-us/azure/frontdoor/quickstart-create-front-door
In the above setup, the origins/backend webapps (both primary & secondary) have equal priority but in your case, you can assign a higher priority to the primary application than the secondary one.
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.