SOA-C03 · Question #118
A company has a stateful web application that is hosted on Amazon EC2 instances in an Auto Scaling group. The instances run behind an Application Load Balancer (ALB) that has a single target group. Th
The correct answer is B. Configure cookie forwarding in the CloudFront distribution cache behavior. E. Enable sticky sessions on the ALB target group.. Configure cookie forwarding in the CloudFront distribution cache behavior. If CloudFront is not forwarding cookies, the origin (ALB/app) will not consistently receive the session cookie, causing users to appear “new” and get logged out. Forwarding cookies ensures the application
Question
A company has a stateful web application that is hosted on Amazon EC2 instances in an Auto Scaling group. The instances run behind an Application Load Balancer (ALB) that has a single target group. The ALB is configured as the origin in an Amazon CloudFront distribution. Users are reporting random logouts from the web application. Which combination of actions should a CloudOps engineer take to resolve this problem? (Choose two.)
Options
- AChange to the least outstanding requests algorithm on the ALB target group.
- BConfigure cookie forwarding in the CloudFront distribution cache behavior.
- CConfigure header forwarding in the CloudFront distribution cache behavior.
- DEnable group-level stickiness on the ALB listener rule.
- EEnable sticky sessions on the ALB target group.
How the community answered
(18 responses)- A11% (2)
- B72% (13)
- C11% (2)
- D6% (1)
Explanation
Configure cookie forwarding in the CloudFront distribution cache behavior. If CloudFront is not forwarding cookies, the origin (ALB/app) will not consistently receive the session cookie, causing users to appear “new” and get logged out. Forwarding cookies ensures the application can maintain user sessions correctly. Enable sticky sessions on the ALB target group. The application is stateful and stores session data on individual EC2 instances. Enabling ALB target group stickiness keeps a user’s requests going to the same instance, preventing session loss and random logouts as traffic shifts between instances.
Topics
Community Discussion
No community discussion yet for this question.