Skip to content

Add Database Load Balancing support

Problem to solve

Gitlab Database Load Balancing feature enables gitlab to distribute read-only queries among multiple database servers, thus improves the distribution of database workloads across multiple computing resources.

Currently GET doesn't support this feature well. For example, use GET to setup a 3k reference architecture, the workflow to database is like client(rails/sidekiq) -> haproxy(6432) -> pgbouncer(3 nodes) -> postgresql master.

Proposal

  1. Install pgbouncer service on every postgresql node, PgBouncer only point to the local Postgresql service
[databases]

gitlabhq_production = host=127.0.0.1 auth_user=pgbouncer
  1. (Optional) Configure GitLab to use the in built Omnibus Consul service replica.postgresql-ha.service.consul to point it at the secondaries
Edited by Grant Young
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information