Database load balancing check for EEP
As part of our effort on GitLab HA, there is the ability to load balance across multiple database servers. Since this is part of our HA feature, this is an EEP feature.
One key difference though between this feature and most of the rest of Postgres HA, is that this is actually part of our GitLab app code. (Whereas much of the rest of Postgres HA is part of the Omnibus code) Since this feature is inside of GitLab, it is aware of the license applied to the instance.
We should add an EEP license check to the database load balancing code. If there is no license, we shouldn't enable this feature. Some additional details:
- If there is no license and this has been configured, we should put a banner warning up on the site to warn people the feature is not active. (Unless there is a better idea on how to convey this?)
- Will need to keep in mind that if the database is having issues we may not be able to query the database to check the license state. Will need to ensure we can validate the license state without having the check back with the database. (This is both steady state as well as startup, since a GitLab app node could be starting up after a failure and the primary node is down.)