Reputation: 85
How will Redis handle an XADD when all available memory is used? Will the oldest item(s) be deleted from the stream and the new item added? Will the old item still exist in the AOF file from when it was added? Will it just throw an error and not add the new item? What should I expect?
Upvotes: 6
Views: 1520
Reputation: 49942
Streams are data structures like all others, so Redis will respect the maxmemory
and maxmemory-policy
in case of RAM pressure. Depending on the policy, new write requests will be denied, or existing keys (streams or not) will be evicted.
Read more about this at https://redis.io/topics/lru-cache
Upvotes: 4