ANS-C01 Question 83
Select 2You are designing a web application hosted on AWS, and you need to distribute incoming traffic across multiple EC2 instances in multiple Availability Zones. The application needs to maintain session persistence for users, and you want to optimize the traffic distribution across instances in all Availability Zones. Which combination of configuration options should you enable on the Application Load Balancer (ALB)?
- A
Enable cross-zone load balancing
- B
Enable sticky sessions (session affinity)
- C
Enable the proxy protocol
- D
Use a round-robin routing algorithm
- E
Enable HTTP/2 protocol support
Show answer and explanation
Correct answers: A, B
Explanation
To meet the application's requirements of session persistence and optimized traffic distribution, you should enable both cross-zone load balancing and sticky sessions. Cross-zone load balancing ensures that traffic is evenly distributed across all targets in all Availability Zones, and sticky sessions ensure user requests are consistently routed to the same target to maintain session persistence. The other options, while useful in different scenarios, do not specifically address these requirements.
- A. Correct.
Cross-zone load balancing ensures that traffic is evenly distributed across all registered targets in all Availability Zones, which optimizes traffic distribution.
- B. Correct.
Sticky sessions (session affinity) ensure that a user's requests are consistently sent to the same target, maintaining session persistence as required by the application.
- C. Incorrect.
The proxy protocol is used to pass the client IP address and port information to the targets, but it does not address session persistence or traffic distribution across zones.
- D. Incorrect.
Round-robin routing is the default routing algorithm for Application Load Balancers, but it does not ensure session persistence or optimize cross-zone traffic distribution.
- E. Incorrect.
HTTP/2 protocol support improves the performance of communication between clients and the ALB but is unrelated to session persistence or cross-zone traffic distribution.