SAA-C03 Question 332
Select 3A company is hosting a web application that serves different types of content to users. They want to use an Application Load Balancer (ALB) to route traffic to different target groups based on the URL path in the requests. For example, requests to '/api/' should be routed to a target group of API servers, and requests to '/static/' should be routed to a target group of static content servers. Which of the following steps should the Solutions Architect take to achieve this?
- A
Configure an Application Load Balancer and create listeners with rules that evaluate the URL path in the requests.
- B
Set up target groups for the API servers and static content servers, and register the appropriate EC2 instances with each target group.
- C
Use a Network Load Balancer instead of an Application Load Balancer since it supports path-based routing.
- D
Add a listener rule to forward traffic to the default target group for any requests that do not match specified rules.
- E
Enable sticky sessions on the Application Load Balancer to maintain session consistency for all requests.
Show answer and explanation
Correct answers: A, B, D
Explanation
To implement path-based routing with an Application Load Balancer, you must define listener rules that evaluate the URL path and forward traffic to the appropriate target groups. Each target group is associated with a set of backend resources (e.g., EC2 instances). Additionally, a default listener rule should be configured to handle any requests that do not match the specified path-based rules. Network Load Balancers do not support path-based routing, and sticky sessions are not relevant for this requirement.
- A. Correct.
Correct: Application Load Balancers support path-based routing and allow you to define rules to evaluate the URL path in incoming requests.
- B. Correct.
Correct: Target groups are required to route traffic to specific backend instances or services. Each target group represents a logical grouping of backend resources.
- C. Incorrect.
Incorrect: Network Load Balancers do not support path-based routing. This functionality is specific to Application Load Balancers.
- D. Correct.
Correct: Adding a default listener rule ensures that any requests that do not match path-based rules are still routed to a valid target group.
- E. Incorrect.
Incorrect: Sticky sessions are not required for this use case. They are used to bind a user's session to a specific backend instance, but this configuration is unrelated to path-based routing.