Skip to content

WIP: Use Redis for CI job queueing

What does this MR do?

Another take on https://gitlab.com/gitlab-org/gitlab-ce/issues/34401.

Currently, it is full Redis-only approach with two-level bucketing to allow spreading of the load and offer "more fair scheduling".

This is Proof of Concept which I'm quite happy of. The jobs/request stays, but instead it becomes very cheap:

  1. I got rid of expensive SQL to balance jobs (this did not scale),
  2. Once the job is picked a normal flow of transitioning the job is done: find object, transition.
  3. I introduced additional worker which re-schedules jobs every some time, to prevent the problems with reliable Sidekiq.

The description of scheduling algorithm is described in MR. It does not put any significant load on sidekiq, as the most expensive operation is being already done: matching jobs with runners.

Why was this MR needed?

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Solves https://gitlab.com/gitlab-org/gitlab-ce/issues/34401.

Edited by Kamil Trzciński | At GitLab Summit

Merge request reports