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.
2
Answers
After talking to AWS ElasticCache engineer, I got these answers:
Hope this helps.
If you’re worried about OOM due to memory usage reaching 100%, you could consider lowering the max_memory setting from its current value. Additionally, there are various strategies you could adopt, such as setting shorter TTLs or utilizing reserved memory for backups without actually performing backups.
Please excuse any clumsiness in my response as this is my first time answering.