CV0-004 Cloud Architecture and Design Practice Question
A company is designing stateless application tiers to support horizontal scaling. Which TWO design principles support statelessness? (Select TWO.)
⚠ Common exam trap
CV0-004 often tests whether candidates recognize that sticky sessions and local session storage are anti-patterns for statelessness — the distractor 'use sticky sessions' sounds like a load-balancing best practice but directly contradicts stateless design.
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
✓
Persist all application state in a shared database
Option A is correct because persisting all application state in a shared database externalizes state from the compute instances, so any instance can serve any request and instances can be added or replaced freely for horizontal scaling. Option C is correct because storing session state in a shared external cache such as Redis keeps session data outside the instance, allowing any instance to read the session and remain interchangeable, which is the essence of statelessness. Option B is not correct because storing configuration files locally on each instance creates per-instance state that must be synchronized and makes instances non-interchangeable. Option D is not correct because local instance storage for session data ties a user's session to a specific instance, preventing free horizontal scaling. Option E is not correct because sticky sessions (session affinity) on the load balancer deliberately pin a client to one instance, which is the opposite of stateless design and hinders horizontal scaling.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Persist all application state in a shared database
Why this is correct
A shared database externalises all session and user state, so any instance can serve any request without relying on local memory. This satisfies the horizontal-scaling constraint, since instances remain interchangeable and can be added or removed freely.
- ✗
Store configuration files on each instance locally
Why it's wrong here
Local configuration files tie each instance to its own settings, so instances diverge and cannot be replaced freely during scaling. It is tempting because local files are fast to read, and this would be correct for immutable images baked at build time, not for runtime configuration shared across instances.
- ✓
Store session state in a shared external cache (e.g., Redis)
Why this is correct
Redis externalises session state so no instance holds it locally, letting any node handle any request. This satisfies the horizontal-scaling constraint by keeping instances interchangeable, unlike in-memory sessions that pin users to a single server.
- ✗
Use local instance storage for session data
Why it's wrong here
Local instance storage keeps session data on a single node, so it is lost when that instance terminates and cannot be shared across scaled instances. It is tempting because local disks are fast, and this would be correct for temporary cache that can be regenerated, not for session state.
- ✗
Use sticky sessions (session affinity) on the load balancer
Why it's wrong here
Sticky sessions bind a client to one instance, so session state persists on that node and scaling or failure breaks continuity. It is tempting because affinity preserves in-memory sessions, and it would be correct for legacy stateful applications that cannot externalise session data.
Go deeper
Related to this question
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 →
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.