AZ-204 Practice Question: Monitor, troubleshoot, and optimize Azure solutions
You deploy a microservices application to Azure Kubernetes Service (AKS). The application uses Azure Cache for Redis to store session state. Users report that they are frequently logged out. You suspect that the session data is being evicted from the cache. Which configuration change should you make to reduce evictions?
⚠ Common exam trap
Candidates often assume the only way to reduce evictions is to add more memory (Option D), when in fact adjusting memory reservation or eviction policy (Option C) can resolve the issue without incurring additional cost, and persistence (Option B) is mistakenly thought to prevent evictions when it only protects against data loss on restart.
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
✓
Increase the maxmemory-reserved setting or change eviction policy
Increasing the `maxmemory-reserved` setting allocates more memory exclusively for non-cache operations (like replication buffers), reducing the chance that session data is evicted under memory pressure. Alternatively, changing the eviction policy to `allkeys-lru` or `volatile-lru` can prioritize keeping recently used keys, which helps retain active session state. Both adjustments directly address the symptom of frequent evictions causing session loss.
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 clustering for the cache
Why it's wrong here
Clustering provides scalability but does not directly reduce evictions.
- ✗
Enable data persistence using RDB or AOF
Why it's wrong here
Persistence saves data to disk but does not prevent evictions.
- ✓
Increase the maxmemory-reserved setting or change eviction policy
Why this is correct
Increasing reserved memory or using a more suitable eviction policy reduces evictions.
- ✗
Upgrade to a higher-tier Azure Cache for Redis
Why it's wrong here
Upgrading changes the instance, not a configuration change on the current cache.
Go deeper
Related to this question
About these practice questions
This AZ-204 question is part of Courseiva's 881-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 AZ-204 practice question is part of Courseiva's free Microsoft 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 AZ-204 exam.