Skip to content

Add MinOccurrences cache middleware

Jacob Vosmaer requested to merge jv-cache-suppressor into master

This adds a new streamcache middleware called MinOccurrences. Its purpose is to only forward requests to the inner cache for keys that have been seen a minimum number of times.

The goal is to reduce the write workload caused by the pack-objects cache. At first we will only validate this on GitLab.com.

At this stage the only way to enable the min occurrences logic is to set an environment variable GITALY_PACK_OBJECTS_CACHE_MIN_OCCURRENCES. This is not the final configuration mechanism, we are doing this so we can get quicker feedback in production.

Part of gitlab-com/gl-infra/scalability#2222 (closed)

Edited by Jacob Vosmaer

Merge request reports