Skip to content

Revert "Use less aggressive sticking for DB load balancing"

Yorick Peterse requested to merge revert-ace6b918 into master

What does this MR do?

This MR reverts https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5732.

The MR in question didn't make performance worse, nor did it break anything. Instead, it simply had no measurable impact. It also requires a bunch of additional (albeit very lightweight) SQL queries to do its work, and I'm not sure yet if I can solve that (apart from https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19021). Some of the metrics I looked at:

  1. CPU usage: no reduction on the primary, or an increase on the secondaries (from having to process more queries)
  2. Load averages: no change
  3. Disk load: no change
  4. Number of connections per host: no change

Instead of keeping this in (including the additional complexity of the code, which I wasn't a fan of from the start), I'm just going to revert this. My next step in reducing load will be looking into getting Sidekiq to use the secondaries, which is likely to have a far bigger impact, but will also take a few days to implement and test.

All of this is a wee bit ironic, since I was making a bit of a ruckus to get this into production.

Merge request reports