javaamazon-web-servicesrediselastic-cache

Is it possible to adjust the eviction policy in AWS ElasticCache - Redis to be less than 100%?


Currently, the policy only executes when it reaches 100%, which often results in OutOfMemory errors. It would seem logical to have the ability to set the policy to be executed at, say, 90% of memory used.

Alternatively, could there be a way to manually trigger the eviction policy through code, for instance, when CloudWatch Alarm is set off due to memory usage exceeding a certain limit.


Solution

  • After talking to AWS ElasticCache engineer, I got these answers:

    1. Currently there is no way to set the Eviction to be at other than 100% percent.
    2. Even if we've reached the 100% mark, once the Eviction started, there is no blockage on the DB. We can continue working as usual.
    3. The Eviction is being performed on all documents with TTL set, regardless of how much time left (It tries to free the shortest TTL first, but there are no guarantees).

    Hope this helps.