1

I have this azure set up.

  1. 2 LOB App Service (web apps) on same region say, contoso.com and Fabrikam.com. I have 3 different regions gloabally with same apps.
  2. Traffic manager will manage these regions.
  3. There is an application gateway in each region to redirect the request to appropriate host.
  4. Traffic manager needs to manage public ip of Application Gateways in all 3 regions and redirect the requests accordingly.

Is this a valid usecase? If yes, How would I configure traffic manager for both the websites?

John
  • 351
  • 5
  • 18
  • Can you provide more details on your item #3: "There is an application gateway in each region to redirect the request to appropriate host. ". Do you have a single app gateway in each region or a separate app gateway for each host? – Alex S Apr 12 '18 at 15:14
  • @AlexS Single app gateway in each region. – John Apr 12 '18 at 15:15
  • Thank you for the clarification. One more question: Am I right to assume that each app gateway is already configured (listeners, rules, back end tool for App Service, HTTP settings)? – Alex S Apr 12 '18 at 15:21
  • @AlexS : Yes they have been defined, but when I access the app gateway by IP directly, it goes to the default backend pool at port 80. If I append anything to the URL for redirection rule, I get 404 error. – John Apr 12 '18 at 15:28
  • @AlexS 2nd part is, Traffic manager has one endpoint to the public ip of app gateway. I can define only one CNAME either contoso.com or fabrikam.com for DNS name of app gateway. How the redirection should work in this case? – John Apr 12 '18 at 15:34
  • Let's take care of app gateway first, then traffic manager. App gateway relies on HTTP host headers to host more than one website on the same public IP address and port. You are accessing app gateway via public IP address which does not tell app gateway which host to serve you, therefore default backendpool is used. In c:\windows\System32\drivers\etc\hosts add Save and then access host names via browser. This should send appropriate host header to Application Gateway. – Alex S Apr 12 '18 at 15:42
  • Reference for host headers: https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-multi-site-overview – Alex S Apr 12 '18 at 15:42
  • The summarize - redirection will occurs on App Gateway based on HTTP host header. You can simulate host header redirection by modifying hosts file in windows as mentioned above. – Alex S Apr 12 '18 at 15:44
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/168854/discussion-between-alex-s-and-john). – Alex S Apr 12 '18 at 15:44

1 Answers1

0

I'm posting an answer based on our chat conversation.

We established that:

  1. You have a single App Gateway in each region.
  2. You have a single Traffic Manager for all regions.
  3. You did not have multi-site listeners configured on App Gateways.
  4. Multi-site listeners need to be configured for each host name: fabrikam.com, www.fabrikam.com, contoso.com, www.contoso.com, etc. Beware that single App Gateway has a limit of 20 multi-site listeners!
  5. Traffic Manager will have three endpoints configured which are the three public IP addresses for each app gateway.
  6. Example hosts that you have used would have CNAMES pointing to the same traffic manager DNS name.
  7. App gateway will redirect traffic to appropriate backend pool based on host header redirection as stated here: https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-multi-site-overview:

Currently an application gateway gets a single public IP address on which it listens for traffic. Therefore supporting multiple applications, each with its own IP address, > is currently not supported. Application Gateway supports hosting multiple applications each listening on different ports but this scenario would require the applications to > accept traffic on non-standard ports and is often not a desired configuration. Application Gateway relies on HTTP 1.1 host headers to host more than one website on the same > public IP address and port. The sites hosted on application gateway can also support SSL offload with Server Name Indication (SNI) TLS extension. This scenario means that > the client browser and backend web farm must support HTTP/1.1 and TLS extension as defined in RFC 6066.

Alex S
  • 1,171
  • 1
  • 9
  • 25