Courseiva

SAP-C02 NLB target group stickiness Practice Question

A company runs a stateful application on EC2 instances in an Auto Scaling group behind a Network Load Balancer (NLB). The application requires that client sessions are maintained to the same instance. The operations team notices that after scaling events, some clients lose their sessions. Which configuration change should the team implement to ensure session persistence?

⚠ Common exam trap

SAP-C02 often tests the misconception that NLBs support cookie-based stickiness like ALBs — candidates must remember NLB is Layer 4 and only supports source IP stickiness.

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 source IP stickiness on the NLB target group.

Network Load Balancers operate at Layer 4 and support only source IP-based stickiness, configured on the target group via the 'stickiness.enabled' and 'stickiness.type=source_ip' attributes. Enabling source IP stickiness ensures that a given client IP is consistently routed to the same backend instance, preserving sessions across scaling events.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Disable cross-zone load balancing on the NLB.

    Why it's wrong here

    Cross-zone load balancing governs how the NLB distributes traffic across availability zones; it does not create flow affinity, so sessions still break when instances are added or removed. It is tempting because zone settings affect routing, but stickiness requires source IP affinity or a load balancer that tracks sessions.

  • ✗

    Enable cookie-based stickiness on the NLB listener.

    Why it's wrong here

    NLB listeners support flow-hash-based stickiness, not cookie-based stickiness; cookie stickiness is an Application Load Balancer feature. It is tempting because cookie stickiness is the standard session-persistence mechanism, making it correct behind an ALB, but the NLB cannot generate or inspect HTTP cookies.

  • ✗

    Switch to an Application Load Balancer and enable cookie-based stickiness.

    Why it's wrong here

    An Application Load Balancer operates at layer 7 and terminates HTTP, so it cannot preserve the layer 4 TCP flows this stateful application relies on; scaling events still sever sessions. It is tempting because cookie stickiness is the usual persistence mechanism, and it would be correct for HTTP workloads.

  • ✓

    Enable source IP stickiness on the NLB target group.

    Why this is correct

    Source IP stickiness on the NLB target group binds each client IP to one target for the flow's duration, so sessions survive scaling events. This satisfies the stem's requirement that clients remain on the same instance behind the Network Load Balancer.

About these practice questions

This SAP-C02 question is part of Courseiva's 984-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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint

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.