Azure Traffic Manager 404 Not Found

149 Views Asked by At

I have deployed Azure Traffic Manager with Geographic routing mode enabled. Added to endpoints to the Traffic Manager (External Endpoints). I run two services (Let's say Service A & Service B) in two different AKS clusters. Ingresses are created for those two services accordingly.

Service A runs in AKS in EU region and has following Ingress: Ingress: myapp.service-a.my-url.com

Service B run in AKS in US region and has following Ingress: Ingress: myapp.service-b.my-url.com

In Azure Traffic Manager as mentioned above, I added two external endpoints (Let's say Endpoint A & Endpoint B)

For Endpoint A I added Ingress of service A which is myapp.service-a.my-url.com Selected EU region as the geo-location and For Endpoint B I added Ingress of service B which is myapp.service-b.my-url.com Selected US region as the geo-location

Finally created an ALIAS record in DNS:

Alias Record: my-service.my-url.com > mytest.trafficmanager.net

Now when I hit my-service.my-url.com it gives 404 Not Found. Is this because I created an ALIAS instead of CNAME for my-service.my-url.com

1

There are 1 best solutions below

3
Daniel Alves On

Assuming that:

  • both services are responding properly when you call them directly;
  • your traffic manager profile is using the correct path and port/protocol to check;
  • when testing these DNS names using nslookup or Resolve-DnsName you receive the expected responses;
  • the response code of the applications is 200 (the traffic manager expects it by default if the Expected Status Code Ranges field is blank) or any other code, considering that you have it defined in this field.

I would say that the problem may be related to be using the ALIAS, as it is not an standard and just some DNS providers normally make any distinction between CNAME and ALIAS records. The official documentation for Traffic Manager states that only CNAME records are suported and because of that CNAME records for the apex domain are not supported (it is not your case in practice, however as ALIAS records can be used in the apex domain, we can assume that they are not supported by Traffic Manager).