A company serves api.example.com and shop.example.com from one HTTPS listener on a single load balancer. Requests for each domain must go to that domain's own target group. Which configuration meets this requirement?
Show the answer
Correct answerB. Host-based listener rules on an Application Load Balancer
AWhy not this: Path rules match the URL path, which does not tell the two domains apart.
BWhy this is right: Host-header rules match each domain name and forward its requests to the matching target group.
CWhy not this: An NLB listener forwards to one target group and does not read the HTTP Host header.
DWhy not this: Sticky sessions keep a client on the same target but do not choose a target group by domain.
Application Load Balancer listener rules can match the Host header, so each domain is forwarded to its own target group, and the listener serves the right certificate for each domain through SNI. A Network Load Balancer can present several certificates, but it forwards each listener to one target group without reading HTTP headers.