スキップしてコンテンツを表示

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年前486ビュー
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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

関連するコンテンツ