Consider support for multi-connection strings for Redis and Postgres
Description
Currently, it appears that Gitlab only supports a single connection to an HA Postgres or HA Redis cluster. If that connection happens to become unhealthy though, there is no way for Gitlab itself to failover to another connection to the cluster - unless maybe there is support for this and I have just not found it.
Proposal
In the event the support does not already exist, I would like to propose that Gitlab add support to accept multiple connection strings in its configuration for Postgres and Redis, and automatically failover to the next connection in the list if one becomes unusable / unstable.
This would add additional HA for the use case where the Gitlab deployment is configured to connect to a remote Postgres / Redis.
For example, in the options, this could be defined like:
gitlab_rails['redis_host'] = 'redis-host-one'
gitlab_rails['redis_port'] = 11111
gitlab_rails['redis_password'] = 'redis-password'
gitlab_rails['redis_host_secondary'] = 'redis-host-two'
gitlab_rails['redis_port_secondary'] = 22222
gitlab_rails['redis_password'] = 'redis-password'
In the Cloud Native charts, this could be defined like so:
unicorn:
enabled: true
redis:
- host: "redis-host-one"
port: 11111
- host: "redis-host-two"
port: 22222
psql:
- host: "postgres-host-one"
port: 11111
database: pg
username: me
password:{}
- host: "postgres-host-two"
port: 22222
database: pg
username: me
password:{}