1 Answer
- Newest
- Most votes
- Most comments
0
- Evictions do not cause downtime. They are handled in the background, allowing Redis to continue serving read and write operations.
- While you cannot directly trigger evictions before the cache is full, you can manage the
maxmemory
setting to start evictions at a desired memory usage level.
CONFIG SET maxmemory 1gb
CONFIG SET maxmemory-policy volatile-ttl
By setting the maxmemory configuration appropriately, you can ensure that evictions start before the cache reaches 100% utilization. For example, setting maxmemory
slightly below the physical memory limit can provide a buffer for the eviction process to begin earlier.
The specific behavior of evictions depends on the eviction policy you have set. With a TTL-based eviction policy (volatile-ttl), Redis will attempt to evict keys with the shortest time-to-live first. This is a way to free up memory without disrupting ongoing operations.
Relevant content
- asked 15 days ago
- asked 6 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 4 months ago