New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Microsoft AZ-204 Exam - Topic 7 Question 42 Discussion

Actual exam question for Microsoft's AZ-204 exam
Question #: 42
Topic #: 7
[All AZ-204 Questions]

You are developing a web application that uses Azure Cache for Redis. You anticipate that the cache will frequently fill and that you will need to evict keys.

You must configure Azure Cache for Redis based on the following predicted usage pattern: A small subset of elements will be accessed much more often than the rest.

You need to configure the Azure Cache for Redis to optimize performance for the predicted usage pattern.

Which two eviction policies will achieve the goal?

NOTE: Each correct selection is worth one point.

Show Suggested Answer Hide Answer
Suggested Answer: B, C

B: The allkeys-lru policy evict keys by trying to remove the less recently used (LRU) keys first, in order to make space for the new data added. Use the allkeys-lru policy when you expect a power-law distribution in the popularity of your requests, that is, you expect that a subset of elements will be accessed far more often than the rest.

C: volatile-lru: evict keys by trying to remove the less recently used (LRU) keys first, but only among keys that have an expire set, in order to make space for the new data added.

Note: The allkeys-lru policy is more memory efficient since there is no need to set an expire for the key to be evicted under memory pressure.


https://redis.io/topics/lru-cache

Contribute your Thoughts:

0/2000 characters
Daniela
3 months ago
I didn't realize there were so many eviction policies!
upvoted 0 times
...
Ahmad
4 months ago
Volatile-lru could work too, but not sure if it's the best fit.
upvoted 0 times
...
Heike
4 months ago
Wait, noeviction? That doesn't help with evicting keys at all.
upvoted 0 times
...
Jenelle
4 months ago
Totally agree, allkeys-lru will prioritize frequently accessed keys!
upvoted 0 times
...
Lezlie
4 months ago
I think allkeys-lru is a solid choice for this.
upvoted 0 times
...
Effie
4 months ago
I think "allkeys-random" might not be optimal since it doesn't consider access patterns, but I'm not completely confident.
upvoted 0 times
...
Clay
4 months ago
I practiced a similar question, and I feel like "noeviction" wouldn't help us at all in this scenario.
upvoted 0 times
...
Lili
5 months ago
I'm not entirely sure, but I think "volatile-lru" could also work since it only evicts keys with an expiration set.
upvoted 0 times
...
Corinne
5 months ago
I remember that "allkeys-lru" is a common choice for eviction when some keys are accessed more frequently.
upvoted 0 times
...
Yoko
5 months ago
Okay, let me think this through step-by-step. The question is talking about a UPS system, and it mentions something about an N+X ratio and power supply guarantee level. I think I can work this out.
upvoted 0 times
...
Mitsue
5 months ago
I'm not entirely sure about this one. There are a lot of moving parts, and I want to make sure I understand the requirements correctly. Maybe I'll try to walk through each option carefully and see which one best matches the problem description.
upvoted 0 times
...
Tien
5 months ago
Whoa, this is a tough one. I'm not totally sure about the syntax for accessing the response headers. I'll have to double-check the documentation to make sure I get this right.
upvoted 0 times
...
Wade
5 months ago
Pretty sure both allow for redundancy, but I need to double-check if they really serve the same function for CE devices or not.
upvoted 0 times
...

Save Cancel