Service discovery for PostgreSQL
As per https://gitlab.com/gitlab-com/infrastructure/issues/1330#note_26460479 we want a service discovery mechanism that can be used to figure out what host is a PostgreSQL primary, and which hosts are secondaries. This system should expose its data via DNS so it can be queried by GitLab in a generic way. This also means pgbouncer can re-use it since it has support for looking up hosts from DNS entries (https://pgbouncer.github.io/faq.html#how-to-load-balance-queries-between-several-servers).
cc @northrup