Question

Difficulty: MediumConfigure Azure Application Gateway

An administrator needs to configure an Azure Application Gateway v2 to host two distinct web applications: sales.contoso.com and marketing.contoso.com. Traffic for sales.contoso.com must be directed to a backend pool named PoolSales, and traffic for marketing.contoso.com must be directed to a backend pool named PoolMarketing. Both applications use HTTPS on port 443. Which configuration should the administrator implement to route the traffic correctly?

  1. A
    Create a single basic listener on port 443, and configure a path-based routing rule that maps the subdomain host headers to the backend pools.
  2. B
    Create a single basic listener on port 443, and configure a user-defined route (UDR) with a next hop type of Virtual Network Gateway to route traffic based on host headers.
  3. Create two multi-site listeners (one for sales.contoso.com and one for marketing.contoso.com), and configure two basic routing rules to map each listener to its respective backend pool.Answer
  4. D
    Create two multi-site listeners, and associate a Network Security Group (NSG) to the Application Gateway subnet with an inbound rule of priority 4096 that denies port 443 traffic.

Answer

Create two multi-site listeners (one for sales.contoso.com and one for marketing.contoso.com), and configure two basic routing rules to map each listener to its respective backend pool.
To host multiple websites or subdomains on a single Azure Application Gateway, you must configure a multi-site listener for each unique domain name. This enables the gateway to evaluate the HTTP Host header of incoming requests. Each multi-site listener is then associated with its own basic routing rule to direct traffic to the correct backend pool.

Step-by-Step Solution

1
Analyze routing requirements
Identify that incoming traffic must be separated and routed to distinct backend pools (PoolSales and PoolMarketing) based on the request's host header (sales.contoso.com or marketing.contoso.com).
This determines that Layer 7 host-based routing is required.
2
Select listener configuration
Create two multi-site listeners on port 443, one configured with the host name sales.contoso.com and the other with marketing.contoso.com.
Basic listeners do not support host header differentiation, whereas multi-site listeners permit hosting multiple domain names on a single gateway instance.
3
Configure request routing rules
Create two basic routing rules, linking the sales listener to PoolSales and the marketing listener to PoolMarketing.
Routing rules map the traffic received by specific listeners to the appropriate backend pools.

Key Concept

Multi-site listeners and request routing rules in Azure Application Gateway
Rate this question