Search code examples
azureazure-traffic-managerazure-application-gateway

Multi-site web apps with traffic manager and appllication gateway


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?


Solution

  • 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.