DOP-C02 Resilient Cloud Solutions Practice Question
A company runs a stateful application on EC2 instances. They want to distribute traffic evenly and maintain session stickiness. Which AWS service should they use?
⚠ Common exam trap
DOP-C02 often tests whether candidates know that only ALB provides cookie-based sticky sessions; picking NLB because it is 'high performance' ignores the session-affinity requirement.
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
✓
Application Load Balancer with sticky sessions
An Application Load Balancer with sticky sessions (session affinity) distributes HTTP/HTTPS traffic across targets while binding a client to the same target for the duration of a session via a cookie. This satisfies both even distribution and session persistence for a stateful application.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Network Load Balancer
Why it's wrong here
Network Load Balancer operates at Layer 4, forwarding raw TCP/UDP traffic and never inspecting HTTP headers or cookies, so it cannot implement application-level session stickiness. Although NLB's target-group stickiness can pin a source IP to a target for a time, that transport-layer affinity does not track the stateful application session. A stateful web app needs cookie-based routing to the same instance, which NLB inherently lacks.
- ✓
Application Load Balancer with sticky sessions
Why this is correct
An Application Load Balancer with sticky sessions is the correct solution because it operates at Layer 7 and can inspect HTTP/HTTPS traffic. ALB uses either the AWSALB cookie with a configurable duration or an application-controlled cookie to send all requests from the same client session to the same EC2 instance. This preserves in-memory session state, which is exactly what a stateful application requires.
- ✗
Amazon Route 53 weighted routing policy
Why it's wrong here
Amazon Route 53 weighted routing is a DNS-level policy that selects a record based on weights when a resolver queries it, but it does not observe subsequent HTTP requests or maintain any session affinity. DNS answers are cached by clients and resolvers for the TTL, so requests from the same user can be resolved to different instances over time. It is a traffic-shaping tool, not a session-stickiness mechanism for stateful EC2 applications.
- ✗
Amazon CloudFront with origin failover
Why it's wrong here
CloudFront with origin failover is a CDN feature that switches between a primary origin and a secondary origin when it detects a failure, but it is not a load balancer and provides no application session stickiness. It does not inspect application session cookies to keep a user on the same EC2 instance; requests may be served by different edge locations and origins. This addresses availability, not stateful session preservation for an EC2-based app.
Go deeper
Related to this question
About these practice questions
One of 1,298 original DOP-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
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 DOP-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 DOP-C02 exam.