An IoT monitoring solution uses Azure Cache for Redis to store two types of data:
1. The latest telemetry reading for each device, which does not have an expiration time (TTL) set.
2. Temporary event logs that are configured with a Time-to-Live (TTL) of 24 hours.
Due to a surge in device activity, the cache is approaching its maximum memory limit. You need to configure the cache eviction policy so that under memory pressure, the cache removes the least recently used temporary event logs first, while ensuring that the device telemetry readings are never evicted.
Which eviction policy should you configure?
- volatile-lruCevap
- Ballkeys-lru
- Cnoeviction
- Dallkeys-random
Cevap
volatile-lru
The volatile-lru policy evicts the least recently used keys among those that have an expiration (TTL) set. Since the latest telemetry readings do not have a TTL, they are completely safe from eviction, while the expiring event logs will be removed as needed under memory pressure.
Adım Adım Çözüm
Anahtar Kavram
Azure Cache for Redis eviction policies control how keys are removed when the cache memory limit is reached. The volatile-lru policy targets only keys with an expiration (TTL) set, protecting keys without an expiration.
Tahmini Süre:1m 30s