Skip to content

Upgrade redis-cache to Redis 6.2 or newer

Redis-cache is the Redis deployment we use as the backing store for Rails.cache. We are currently using Redis 6.0. It is configured as an LRU cache using the maxmemory directive. As we have known for quite some time now (https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/9420, #862 (closed), #1556 (closed)), the way maxmemory is implemented in Redis 6.0 and earlier leads to latency spikes. This is because the implementation favours throughput (evict old keys as fast as possible) over latency. Thankfully, in Redis 6.2 there is a change in the implementation of maxmemory so that it now favours latency over throughput.

Because of this we should upgrade redis-cache to Redis 6.2. We probably want to upgrade all our Redis instances to the same version, but only redis-cache suffers from these maxmemory latency spikes so we should upgrade it first. None of the other instances uses maxmemory.

The upgrade to Redis 6.0 was carried out by Reliability and tracked in &395. We can probably use that epic as a starting point.

Change Issue: production#6360

Edited by Alejandro Rodríguez