Q21 — AWS ANS-C01 Ch.1
Question 21 of 100 | ← Chapter 1
A company has 10 web server Amazon EC2 instances that run in an Auto Scaling group in a production VPC. The company has 10 other web servers that run in an on-premises data center. The company has a 10 Gbps AWS Direct Connect connection between the on-premises data center and the production VPC. The company needs to implement a load balancing solution that receives HTTPS traffic from thousands of external users. The solution must distribute the traffic across the web servers on AWS and the web servers in the on-premises data center. Regardless of the location of the web servers, HTTPS requests must go to the same web server throughout the entire session. Which solution will meet these requirements?
- A. Create a Network Load Balancer (NLB) in the production VPC. Create a target group. Specify IP as the target type. Register the EC2 instances and the on-premises servers with the target group Enable connection draining on the NLB
- B. Create an Application Load Balancer (ALB) in the production VPC. Create a target group Specify IP as the target type. Register the EC2 instances and the on-premises servers with the target group. Enable application-based session affinity (sticky sessions) on the ALB. ✓
- C. Create a Network Load Balancer (NLB) in the production VPCreate a target group. Specify instance as the target type. Register the EC2 instances and the on-premises servers with the target group. Enable session affinity (sticky sessions) on the NLB.
- D. Create an Application Load Balancer (ALB) in the production VPC. Create a target group. Specify instance as the target type Register the EC2 instances and the on-premises servers with the target group Enable application-based session affinity (sticky sessions) on the ALB.
Correct Answer: B. Create an Application Load Balancer (ALB) in the production VPC. Create a target group Specify IP as the target type. Register the EC2 instances and the on-premises servers with the target group. Enable application-based session affinity (sticky sessions) on the ALB.
Explanation
答案B正确。ApplicationLoadBalancer(ALB)适合处理HTTP和HTTPS流量,并且能够通过设置应用程序级别的会话亲和性(stickysessions),确保在整个会话期间HTTPS请求始终发送到同一台服务器,无论服务器位于AWS还是本地数据中心。对于目标类型选择IP可以注册本地服务器。而NetworkLoadBalancer(NLB)主要用于处理流量的快速分发,不太适合处理会话亲和性的需求。综上所述,选项B能满足题目的要求。 查看全部