AWS Certified Developer – Associate — Question 185
A company is running a software-as-a-service (SaaS) application in its on-premises data center. The application architecture uses a frontend Apache web server to support many customer-specific websites. The Apache web server routes traffic to a different set of servers based on the domain name that is specified in the host header of the initial request.
The company decides to move its architecture to AWS. A developer is moving the customer-specific backend servers onto Amazon EC2 instances. The developer must configure the EC2 instances in Auto Scaling groups for each customer and must register the instances in different target groups. The developer needs to replace the frontend Apache web server with an Elastic Load Balancing (ELB) load balancer. The developer also must forward queries for specific domain names to the appropriate target groups.
Which configuration on AWS will meet these requirements?
Answer options
- A. Use a Network Load Balancer and host-based routing to respective backend target groups.
- B. Use a Network Load Balancer and path-based routing to respective backend target groups.
- C. Use an Application Load Balancer and host-based routing to respective backend target groups.
- D. Use an Application Load Balancer and path-based routing to respective backend target groups.
Correct answer: C
Explanation
The correct answer is C because an Application Load Balancer supports host-based routing, which allows it to direct traffic based on the domain name specified in the requests, matching the requirement of routing to specific target groups. Options A and B involve a Network Load Balancer, which does not support host-based routing, making them unsuitable for this scenario. Option D, while it uses an Application Load Balancer, relies on path-based routing, which does not meet the requirement of directing traffic based on domain names.