0
votes

I have a multi-tenant SaaS app that has been running behind Azure Traffic Manager (Configured using the Priority method) for some time now. (Tenants are identified by subdomain, ie tenant1.mydomain.com, tenant1.mydomain.com, etc)

Now I have added an endpoint to my Azure Traffic Manager, and specified a Custom Header Setting as follows: host:[tenantX].mydomain.com.

My expectation is that all requests for tenantX.mydomain.com should be now routed to the new endpoint I have added, but logging shows that this is not the case...all requests are still going to the priority 1 endpoint.

Am I missing something, or is this not supposed to be what Azure Traffic Manager's Custom Header settings are supposed to used for? Or should I be changing the routing method? If so, to what?

1
It actually looks like this was just a timing issue...I had to wait a while longer. Because my logging now shows that the requests are being routed as expected.Shawn de Wet
Well, you may remove this thread or post the comment as an answer to close this question.Nancy Xiong
no actually now I've found that it is not working as expected! Nuts! Now it turns out that ALL traffic is being routed to my new endpoint.Shawn de Wet
so it seems I'm misunderstanding the purpose of the Custom Header settings in Azure Traffic Manager.....they are not there to define which requests get routed to which endpoints?Shawn de Wet

1 Answers

1
votes

The Custom Header settings are used to specify a host header ensuring that it hits the correct site when Traffic Manager performs health monitoring. It does not set which requests get routed to which endpoints. You only could define the routing methods via the six traffic-routing methods to determine how to route network traffic to the various service endpoints.

For example, in this blog, you will see that it needs to set the hostname under custom header settings to let Ambassador know which container application in the Kubernetes cluster it should forward the endpoint monitoring request.

Custom header settings This configuration setting helps you add specific HTTP headers to the health checks that Traffic Manager sends to endpoints under a profile. The custom headers can be specified at a profile level to be applicable for all endpoints in that profile and / or at an endpoint level applicable only to that endpoint. You can use custom headers for having health checks to endpoints in a multi-tenant environment be routed correctly to their destination by specifying a host header. You can also use this setting by adding unique headers that can be used to identify Traffic Manager originated HTTP(S) requests and processes them differently. You can specify up to eight header:value pairs seprated by a comma. For example, "header1:value1,header2:value2".