Question #1376
A company operates a backend API service on AWS, utilizing multiple Amazon EC2 instances to enhance fault tolerance. They need to route incoming API requests evenly across all instances while presenting a unified DNS endpoint to the clients. Which AWS service should they implement to achieve this?
VPC endpoints
Application Load Balancer
NAT gateway
Internet gateway
Explanation
The correct answer is B. Application Load Balancer (ALB).
Why ALB?
- ALB is designed to route HTTP/HTTPS traffic across multiple targets (e.g., EC2 instances) using load balancing algorithms, ensuring even distribution.
- It provides a single DNS endpoint for clients, simplifying access to the backend service.
- ALB supports health checks to route traffic only to healthy instances, enhancing fault tolerance.
Why other options are incorrect:
- A. VPC endpoints: Used for private connectivity to AWS services (e.g., S3) within a VPC, not for load balancing.
- C. NAT gateway: Allows private subnet instances to access the internet but does not route traffic between EC2 instances.
- D. Internet gateway: Enables public internet access for resources in a VPC but does not perform load balancing.
Key Points:
- Use ALB for HTTP/HTTPS load balancing and unified DNS.
- ALB ensures fault tolerance via health checks and traffic distribution.
- Other services (VPC endpoints, NAT, Internet gateway) do not handle load balancing.
Answer
The correct answer is: B