PCDE Practice Question: Manage a solution that can span multiple database technologies
A Memorystore for Redis instance is running out of memory. The application can tolerate some data loss but not crashes. The team wants to ensure the instance remains available without manual intervention. Which eviction policy should they configure?
⚠ Common exam trap
A common trap is to assume volatile policies (like volatile-lru or volatile-ttl) are safer because they only affect keys with TTL. However, if most keys lack expiration, these policies fail to free memory, leading to crashes—whereas allkeys-lru guarantees eviction across all keys to maintain availability.
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
✓
allkeys-lru
(allkeys-lru) is correct because it allows Redis to evict the least recently used keys from the entire keyspace when memory is full, which keeps the instance available without crashing. Since the application can tolerate some data loss but not crashes, this policy ensures memory pressure is relieved automatically, preventing out-of-memory errors that would cause the instance to become unavailable.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
volatile-lru
Why it's wrong here
volatile-lru only evicts keys with TTL set; keys without TTL can fill memory.
- ✗
volatile-ttl
Why it's wrong here
volatile-ttl evicts keys with TTL set; if most keys have no TTL, memory may fill up.
- ✗
noeviction
Why it's wrong here
noeviction will cause writes to fail when memory is full, possibly crashing the application.
- ✓
allkeys-lru
Why this is correct
Correct. This evicts the least recently used keys across all keys, ensuring availability.
Go deeper
Related to this question
About these practice questions
This PCDE question is part of Courseiva's 1,446-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 PCDE practice question is part of Courseiva's free Google Cloud 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 PCDE exam.