Q11 — AWS SOA-C02 Ch.1
Question 11 of 100 | ← Chapter 1
A company deployed a new web application on multiple Amazon EC2 instances behind an Application Load Balancer (ALB). The EC2 instances run in an Auto Scaling group. Users report that they are frequently being prompted to log in. What should a SysOps administrator do to resolve this issue?
- A. Configure an Amazon CloudFront distribution with the ALB as the origin.
- B. Enable sticky sessions (session affinity) for the target group of EC2 instances. ✓
- C. Redeploy the EC2 instances in a spread placement group.
- D. Replace the ALB with a Network Load Balancer.
Correct Answer: B. Enable sticky sessions (session affinity) for the target group of EC2 instances.
Explanation
题目考察用户对负载均衡器会话持久性配置的理解。问题源于用户请求被不同EC2实例处理导致会话中断。ALB的粘性会话功能通过cookie将用户请求路由到同一目标实例,维持会话连续性。其他选项中,CloudFront用于内容分发,置放群组影响实例物理位置,NLB替换不解决应用层会话问题。正确配置在ALB目标组启用粘滞会话即可解决重复登录问题。参考AWS文档关于Application Load Balancer粘滞会话部分。