Reputation: 79467
I have a cache.t4g.micro cluster which has with 0.5 GiB memory (I assume this is RAM memory).
What happens if I try to add more data than that? Would that be written to HDD/SSD storage (but the docs don't mention such storage, only RAM), or would StringSetAsync()
simply fail? Or maybe the oldest key/value pair would be removed from the cache to make room?
Basically what happens if storage capacity is exceeded in ElastiCache?
Upvotes: 1
Views: 1828
Reputation: 4114
Redis keeps its entire dataset in memory (why?).
Redis behavior when memory storage is exceeded depends on maxmemory-policy
configuration (documentation here).
Possible values for maxmemory-policy
are (source: redis.conf):
When it comes to AWS ElastiCache, Redis engine is configured via Parameter Groups.
The default parameter group default.redis6.x
for example specifies a value of volatile-lru
for maxmemory-policy
but you can create your own parameter group and change this value as you see fit.
Upvotes: 2