Question

Difficulty: EasyAuto Scaling and Elastic Load Balancing (ELB)

A solutions architect is configuring an Application Load Balancer (ALB) and an Auto Scaling group to host a stateful web application. The application requires user session state to be maintained on the specific Amazon EC2 instance where the session was established. Which of the following configurations should the solutions architect implement to meet these requirements? (Select two.)

  1. Enable sticky sessions (session affinity) on the Application Load Balancer target group.Answer
  2. Configure the target group to use duration-based cookies or application-based cookies.Answer
  3. C
    Create a Route 53 Latency routing policy to direct users to the nearest EC2 instance.
  4. D
    Modify the Network ACLs of the public subnets to allow stateful return traffic to specific EC2 instances.
  5. E
    Configure the target group health check port to match the custom session state port.

Answer

To maintain user session state on specific instances, enable sticky sessions (session affinity) on the Application Load Balancer target group and configure the target group to use duration-based or application-based cookies.
To maintain user session state on specific EC2 instances, the solutions architect must enable sticky sessions (session affinity) on the target group associated with the Application Load Balancer. Sticky sessions use cookies to bind a client session to a specific instance. Consequently, configuring the target group to use duration-based or application-based cookies is also required to manage the cookie lifecycle and affinity behavior.

Step-by-Step Solution

1
Analyze the application requirements.
The application is stateful and stores session data in instance memory, requiring client requests to be sent to the same EC2 instance.
Identify the need for session stickiness (affinity) at the load balancer level.
2
Select the appropriate load balancer configuration option.
Enabling sticky sessions on the target group forces the Application Load Balancer to route requests from the same user to the same target instance.
Provide the core routing capability to maintain session affinity.
3
Define the cookie mechanism for tracking session affinity.
Choose either duration-based cookies or application-based cookies under target group attributes.
Provide the client-side mechanism (cookies) that the load balancer uses to route the client back to the correct instance.

Key Concept

Session stickiness (session affinity) allows an Application Load Balancer to bind a user's session to a specific target instance by using cookies.
Estimated Time:1m 0s
Rate this question