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
- 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
- (Optional) Configure GitLab to use the in built Omnibus Consul service
replica.postgresql-ha.service.consulto point it at the secondaries
Edited by Grant Young