Caching keys without TTL causes unbounded memory growth
7/10 HighStoring cache keys without expiration causes indefinite accumulation over time, leading to unbounded memory growth, increased eviction pressure, and out-of-memory errors. Keys added without TTLs because "data never changes" persist even after assumptions change, causing unpredictable eviction behavior.
Sources
Collection History
Bugs in Lua scripts or shared dictionary (ngx.shared.DICT) management can break traffic routing...Failure to implement a TTL (Time-To-Live) or proper eviction policy for keys in the dictionary causes it to fill up, resulting in Out-of-Memory (OOM) errors or cache thrashing.
Storing cache keys without an expiration means they accumulate indefinitely. Over time this leads to unbounded memory growth, increased eviction pressure, and potentially out-of-memory errors.