내용으로 건너뛰기

Is there a downtime during eviction phase of elastic cache serverless ?

0

The Elastic Cache Serverless documentation says "Evictions occur when cache memory is overfilled or is greater than the maxmemory setting for the cache, causing the engine to select keys to evict to manage its memory." https://docs.aws.amazon.com/whitepapers/latest/database-caching-strategies-using-redis/evictions.html

If I set eviction policy based on ttl : a) Will it cause downtime of cache (not accepting any read or write) when the cache is full ? (Or the eviction running in background without causing outage) b) Can TTL based eviction be triggered much earlier before cache reaching 100%

질문됨 2년 전478회 조회
1개 답변
0
  1. Evictions do not cause downtime. They are handled in the background, allowing Redis to continue serving read and write operations.
  2. 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.

전문가
답변함 2년 전
전문가
검토됨 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

관련 콘텐츠