Which solution can the company use to route traffic to all the EC2 instances?
Create an Amazon Route 53 geolocation routing policy to route requests to one of the two NLBs. Create an Amazon CloudFront distribution. Use the Route 53 record as the distribution’s origin.
Create a standard accelerator in AWS Global Accelerator. Create endpoint groups in us-west-2 and eu-west-1. Add the two NLBs as endpoints for the endpoint groups.
Attach Elastic IP addresses to the six EC2 instances. Create an Amazon Route 53 geolocation routing policy to route requests to one of the six EC2 instances. Create an Amazon CloudFront distribution. Use the Route 53 record as the distribution’s origin.
Replace the two NLBs with two Application Load Balancers (ALBs). Create an Amazon Route 53 latency routing policy to route requests to one of the two ALBs. Create an Amazon CloudFront distribution. Use the Route 53 record as the distribution’s origin.
Explanations:
While creating a geolocation routing policy can direct traffic to specific NLBs based on user location, it does not effectively route to all EC2 instances since it only targets one NLB at a time. Additionally, the inclusion of a CloudFront distribution adds complexity without addressing routing to both NLBs effectively.
AWS Global Accelerator is designed to improve performance and availability by routing traffic to optimal endpoints based on latency. Creating endpoint groups for both NLBs in different regions allows for efficient routing to all EC2 instances, optimizing user experience based on their location.
This option suggests using a geolocation routing policy for individual EC2 instances rather than balancing traffic across NLBs. Additionally, Elastic IPs are unnecessary for EC2 instances behind a load balancer, and the use of a CloudFront distribution adds unnecessary complexity without solving the routing issue effectively.
Although replacing NLBs with ALBs and using a latency routing policy could improve routing based on latency, the addition of CloudFront is not directly relevant for routing to the ALBs. This approach also requires more significant architectural changes without providing a more effective solution than using Global Accelerator.