SAA-C03 Practice Question: ElastiCache Redis supports sorted sets (ZSET) for…
A company needs to implement session management for a web application. Sessions must persist across multiple EC2 instances, survive EC2 failures, and be accessible with sub-millisecond latency. Sessions must also be sortable by last-access time to expire the oldest sessions first. Which caching solution should a solutions architect recommend?
⚠ Common exam trap
Memcached and Redis are both ElastiCache engines, but they serve different needs. Any requirement involving sorted data, complex data structures, persistence, or replication eliminates Memcached. Redis sorted sets (ZSET) store members with numeric scores and support range queries — perfect for session expiry queues ordered by last-access timestamp.
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
✓
Amazon ElastiCache for Redis with sessions stored as sorted sets
Amazon ElastiCache for Redis satisfies all requirements: multi-instance session sharing (sessions stored externally), sub-millisecond latency, survival of EC2 failures (stored outside instances), and sorted sets (ZSET data structure) for ordering sessions by last-access score. Memcached supports only simple key-value pairs — it cannot perform sorted set operations to order sessions by last-access time. Memcached also lacks replication, meaning a node failure loses all cached sessions.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Amazon ElastiCache for Memcached with session data stored as key-value pairs
Why it's wrong here
ElastiCache for Memcached offers sub-millisecond key-value access, but it only supports simple string key-value pairs and has no sorted set operations, so you cannot maintain an ordered ranking of sessions by last access. In addition, Memcached has no built-in replication or Multi-AZ failover, meaning a single node failure permanently destroys all cached session data. These limitations make it impossible to meet both the performance and reliability requirements of the session-management scenario.
- ✗
Amazon DynamoDB with TTL enabled for session expiration
Why it's wrong here
DynamoDB with TTL provides automatic session expiration, but its single-digit millisecond read latency cannot match the sub-millisecond requirement. More importantly, DynamoDB lacks native sorted set data structures, so you cannot efficiently rank sessions by last-access time. Although TTL handles expiry cleanly, the missing in-memory speed and set operations make it unsuitable for this low-latency, ordered session-management use case.
- ✓
Amazon ElastiCache for Redis with sessions stored as sorted sets
Why this is correct
ElastiCache for Redis is the correct solution because it stores sessions in memory for sub-millisecond latency and uses sorted sets to maintain an ordered score per session, ideal for tracking last-access time. Multiple replicas with Multi-AZ deployment provide automatic failover, and because the session store is external to EC2 instances, every instance can serve any session without state affinity. ZADD/ZINCRBY and ZRANGE operations deliver exactly the required sorted-set semantics for session management.
- ✗
ElastiCache for Redis with sticky sessions enabled on the Application Load Balancer
Why it's wrong here
Enabling sticky sessions on an Application Load Balancer alongside Redis actually undermines high availability: the ALB pins each client to one EC2 instance, so if that instance fails, the client cannot reach a healthy instance even though the session data remains safe in Redis. The whole point of externalizing sessions to ElastiCache is to allow any instance to handle any request, so stickiness introduces a single point of failure for session ownership. Redis itself already provides shared state; stickiness is unnecessary and harmful for resilience.
Go deeper
Related to this question
About these practice questions
This SAA-C03 question is part of Courseiva's 935-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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SAA-C03 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 SAA-C03 exam.