Lower the default Rails.cache ttl to 8 hours
What does this MR do and why?
8 hours is the configuration we settled on for GitLab.com.
This helps keeping Redis' memory usage lower, which in turn avoids it having to evict a lot of keys when it reaches maxmemory. In gitlab-com/gl-infra/scalability#1601 (closed) we have determined that these evictions cause a reduced throughput on the Redis-side. Which in turn makes the clients wait, causing requests to be slower during one of these eviction bursts.
In gitlab-com/gl-infra/scalability#1854 (closed) we've gradually lowered the TTL to where these eviction bursts were no longer a problem, while not affecting the cache hit ratio or overall request latency.
The traffic patterns of self-managed instances might be very different, but 8 hours (a working day) is likely a good default for most cases.
Clean up after gitlab-com/gl-infra&764 (closed)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.