Skip to content

Should http.publish_host resolve the CNAME configured. #22029

@Mpdreamz

Description

@Mpdreamz

http.publish_host is resolved while starting the node but I'm not entirely sure this makes sense.

This setting is a great way to advertise CNAME to http clients that might not be resolvable on the network the nodes themselves live on or the firewall they are behind.

http.publish_host: elastic.co

GET /_nodes/http?pretty=true

{
  "_nodes" : {
    "total" : 1,
    "successful" : 1,
    "failed" : 0
  },
  "cluster_name" : "testtesttest",
  "nodes" : {
    "PTUZtqXjSY-mjPiQPWGXPg" : {
      "name" : "PTUZtqX",
      "transport_address" : "10.2.42.55:9300",
      "host" : "10.2.42.55",
      "ip" : "10.2.42.55",
      "version" : "5.0.0",
      "build_hash" : "253032b",
      "roles" : [
        "master",
        "data",
        "ingest"
      ],
      "http" : {
        "bound_address" : [
          "127.0.0.1:9200",
          "[::1]:9200",
          "10.2.42.55:9200"
        ],
        "publish_address" : "35.160.254.14:9200",
        "max_content_length_in_bytes" : 104857600
      }
    }
  }
}

It also advertises the resolved IP and not the CNAME which might not play well with DNS caching, the lazy transport resolving coming in 5.1 as per #21630 does not seem to extend to these settings.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions