We have multiple applications that connect to external services, such as presto, MySQL/MariaDB, PostgresSQL, Druid, Kafka, Zookeeper, etc, via hostnames.
Examples in Superset
Datahub-next uses the following configuration
global: kafka: bootstrap: server: "kafka-test1006.eqiad.wmnet:9092" zookeeper: server: "zookeeper-test1002.eqiad.wmnet:2181" schemaregistry: type: "INTERNAL" sql: datasource: host: "an-test-coord1001.eqiad.wmnet:3306" hostForMysqlClient: "an-test-coord1001.eqiad.wmnet" port: "3306" url: "jdbc:mysql://an-test-coord1001.eqiad.wmnet:3306/datahub?verifyServerCertificate=true&useSSL=true&useUnicode=yes&characterEncoding=UTF-8&enabledTLSProtocols=TLSv1.2" driver: "com.mysql.cj.jdbc.Driver"
Ideally, we could try to rely on CNAMEs or even on internal DNS records exposed by our external-services setup (see T331894).
The ultimate goal would be to decorrelate machine names from application deployments, so we don't have to kickstart redeploys when a host changes.



