redis: Tune settings for `cache` and `store`
Created by: tsenart
This commit reverts the part of #8114 that made redis-cache
not persistent. Sourcegraph cannot work well with a cold cache, so we need to persist this cached data to prevent cold starts (e.g. for GitHub and GitLab cached user permissions).
It also tunes Redis settings specifically for cache
and store
to match what we have in the kubernetes deployments:
-
store
: We change themaxmemory-policy
setting tonoeviction
. -
cache
: Since it's ephemeral, we don't use AOF persistence, but reduce the RDB snapshot interval to 60 seconds — this means we have a data loss window of 1 minute, which should be fine for cache, specially since persistence only optimizes the cold cache scenario.
Merge request reports
Activity
Created by: codecov[bot]
Codecov Report
Merging #8235 into master will decrease coverage by
<.01%
. The diff coverage is0%
.@@ Coverage Diff @@ ## master #8235 +/- ## ========================================== - Coverage 40.64% 40.64% -0.01% ========================================== Files 1289 1289 Lines 67697 67698 +1 Branches 6321 6321 ========================================== Hits 27516 27516 - Misses 37614 37615 +1 Partials 2567 2567
Impacted Files Coverage Δ internal/redispool/redispool.go 47.36% <ø> (ø)
cmd/server/shared/redis.go 26.02% <0%> (-0.37%)
Please register or sign in to reply