azureazure-devopsdnstrafficazure-traffic-manager

Azure External Endpoint Configuration


I'm trying to add two External Endpoints to Azure Traffic Manager.

I have hosted two react apps (Same app) in both Firebase Hosting and GCP App Engine (two regions) The URLs are

https://XXXXX-alt.el.r.appspot.com/sign-in
https://XXXXXX.web.app/sign-in

I added "cardynnasty-alt.el.r.appspot.com" and "cardynastyadmin.web.app" as endpoints and I come across 2 issues.

One is, traffic manager URL is http, and this gives a warning. Second is, the resource cannot be found.

I'm quite new to this subject and would like to know how I can configure a custom domain to sort out this issue. I suspect the first step is purchasing 2 domains from namecheap or godaddy or somewhere..

I'm not sure about the next steps.. I purchased namecheap domains and added DNS such that they are now reachable with namecheap domains.

How do I get these domains working with Azure Traffic Manager? Just adding them as external endpoints brings me to "path not found" errors..


Solution

  • • The traffic manager URL is http and thus it gives out a warning because traffic manager works at the DNS level which is at the application layer (Layer 7). Traffic Manager uses DNS to direct clients to specific service endpoints based on the rules of the traffic-routing method. Clients connect to the selected endpoint directly. Traffic Manager is not a proxy or a gateway. The Traffic Manager does not see the traffic passing between the client and the service.

    Thus, the traffic manager URL will remain an HTTP URL unless you create a CNAME record for the custom domain that you want to use in place of the traffic manger URL, i.e., if you intend to use ‘apps.cardynasty.com’ as the traffic manager URL instead of ‘contoso.trafficmanager.net’, then you need to create a ‘CNAME’ record for ‘contoso.trafficmanager.net’ to redirect to ‘apps.cardynasty.com’ for the traffic manager whenever it is called upon. And for this purpose, you will need to own the ‘cardynasty.com’ domain on a public DNS server for handling various types of DNS records for the said custom domain. Hence, when done, the HTTP error will also vanish as the traffic manager URL is redirected to a custom subdomain registered URL.

    • And for the second issue that you want to configure custom domain for your two altogether separate apps but want their traffic to be managed by an Azure traffic manager through a single FQDN. For that purpose, since you have purchased the root domains of both the apps, i.e., ‘appspot.com’ and ‘web.app’, you have the sole ownership of creating and handling various types of DNS records for these two domains. Thus, now you will have to create ‘A’ host records for the apps that are using the root domains as their DNS host, i.e., create an ‘A’ host record for ‘cardynnasty-alt.el.r.appspot.com’ in the public DNS where you have purchased the ‘appspot.com’ domain name and similarly create an ‘A’ host record for ‘cardynastyadmin.web.app’ in the public DNS where you have purchased the ‘web.app’ domain name.

    DNS resolution in traffic manager

    In this way, now when you add the stated ‘cardynnasty-alt.el.r.appspot.com’ and ‘cardynastyadmin.web.app’ as external endpoints in the traffic manager, the redirection will be successful, and the app page will be appropriately loaded up when the ‘apps.cardynasty.com’ page will be searched for according to the routing rules defined for the traffic manager profile. For more information regarding the above, kindly refer to the documentation link below for more reference: -

    https://learn.microsoft.com/en-us/azure/traffic-manager/traffic-manager-how-it-works

    https://learn.microsoft.com/en-us/azure/traffic-manager/traffic-manager-faqs