Courseiva
Accelerate Workload Migration and ModernizationmediumMultiple ChoiceObjective-mapped

SAP-C02 Sticky sessions (session affinity) Practice Question

A company is migrating a multi-tier web application to AWS. The application uses sticky sessions (session affinity). The company wants to use an Application Load Balancer (ALB). How should the architect configure the ALB to support sticky sessions?

⚠ Common exam trap

Candidates often confuse the location where stickiness is configured: it's on the target group, not the listener or load balancer.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Enable stickiness on the target group and set a cookie expiration duration.

ALB supports sticky sessions by enabling stickiness on the target group and setting a cookie expiration duration. Option A is wrong because ALB uses cookies for session affinity, not a custom header. Option C is wrong because the question specifies using an ALB, not an NLB, and proxy protocol is for preserving client IP, not sticky sessions. Option D is wrong because placing ElastiCache in front of the ALB is not a load balancer configuration; it is an external solution for storing session data.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Configure the ALB listener to use a custom header for session affinity.

    Why it's wrong here

    Stickiness is configured on the target group, not the listener.

  • Enable stickiness on the target group and set a cookie expiration duration.

    Why this is correct

    ALB supports sticky sessions via a cookie; configuration is on the target group.

  • Use a Network Load Balancer (NLB) and enable proxy protocol.

    Why it's wrong here

    NLB does not support cookie-based stickiness.

  • Place an Amazon ElastiCache cluster in front of the ALB to store session data.

    Why it's wrong here

    ElastiCache caches session data but does not provide load balancer stickiness.

About these practice questions

This SAP-C02 question is part of Courseiva's 1,660-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SAP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SAP-C02 exam.