Fresh eyes code review of ee/lib/gitlab/database/load_balancing

I'm looking for a fresh eyes review of the ee/lib/gitlab/database/load_balancing code directory. We had an incident this morning that may be related to a bug in this part of the code base. I'd like to do an independent audit on this since it feels like a worthy experiment.

@timzallmann @dhavens @tstadelhofer @cdu1 @bmarnane can you determine who might be able to participate and turn this around in the next couple of days. It's approximately ~1000 lines among the files in this directory.

What I'm looking for:

  • Possible bugs found
  • Questions around how the code base works
  • Any suggestions related to observability we think are worthwhile

This will also give other team members some visibility into a part of the code base they haven't experienced and learn something. Multiple members can review the code, so I would encourage more than one participant.

cc: @stanhu @glopezfernandez

Summary of possible followups [2019-08-15 Thong]

Followups

~"group::autodevops and kubernetes" will own the following improvements to logging:

Edited by 🤖 GitLab Bot 🤖