Courseiva
Deployment →mediumMultiple Choice

CV0-004 Deployment Practice Question

A company is deploying a web application on AWS using an Auto Scaling group of Amazon EC2 instances behind an Application Load Balancer (ALB). The application stores user session data locally on each instance. During a scaling event, users are being logged out because their sessions are not available on new instances. The company wants to implement a solution that allows sessions to persist across all instances without modifying the application code. Which approach should be used?

⚠ Common exam trap

The trap here is assuming that sticky sessions on the load balancer are sufficient for session persistence during scaling events, when in fact they only tie a user to a single instance and do not share session data across instances.

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

✓

Store session data in an Amazon ElastiCache for Redis cluster.

Amazon ElastiCache for Redis is a fully managed in-memory data store that is ideal for session management. It provides sub-millisecond latency and can scale to handle high request rates. By externalizing session state to Redis, all instances in the Auto Scaling group can access the same session data, so users remain logged in even when instances are added or removed. This is a common pattern for stateless web applications.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Enable sticky sessions (session affinity) on the ALB.

    Why it's wrong here

    Sticky sessions on the ALB would route a user to the same instance for the duration of the session, but this does not solve the problem during scaling events. If an instance is terminated, the session data is lost. Sticky sessions also can lead to uneven load distribution. The requirement is to persist sessions across all instances without code changes, which sticky sessions do not achieve.

  • ✓

    Store session data in an Amazon ElastiCache for Redis cluster.

    Why this is correct

    Amazon ElastiCache for Redis provides a centralized, in-memory data store that can be used to store session data. By configuring the application to use Redis as the session store, sessions become available to all instances in the Auto Scaling group. This requires no application code changes if the application already supports external session stores, or minimal configuration changes. It ensures sessions persist even if instances are added or removed.

  • ✗

    Configure the Auto Scaling group to use a launch template with a pre-baked AMI that includes session data.

    Why it's wrong here

    Pre-baking session data into an AMI is not feasible because session data is dynamic and user-specific. It would become stale immediately. This approach does not provide a shared session store and would not allow sessions to persist across instances. It also requires rebuilding the AMI frequently, which is operationally inefficient.

  • ✗

    Use an Amazon RDS database to store session data.

    Why it's wrong here

    Amazon RDS can store session data, but it is not optimized for high-throughput, low-latency session access. Using a relational database for session storage can introduce latency and scalability bottlenecks. While it is a valid option, it is not the best fit for session persistence in a high-traffic web application. The scenario implies a need for a performant, scalable solution.

About these practice questions

Courseiva writes every CV0-004 question from scratch — 834 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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 CompTIA exam blueprint

This CV0-004 practice question is part of Courseiva's free CompTIA 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 CV0-004 exam.