Forgive my dumbness

Please forgive my ignorance while I still try and figure out how all this works.

So I have somehow managed to setup a consul and nomad cluster with dns forwarding and I can access consul.service.consul:8500 in a web browser and it shows me the consul webui which is great.

However I thought that one of the points of consul was mask having to provide ports to services? If this is the case then how would one go about doing this?

A minor, optional point, perhaps.

There are many ways to consume Consul service information, and some can make use of automatic port information, whilst others cannot.

If you happen to be using a client for a specific protocol that uses DNS SRV lookups, it will see the port advertised in Consul. Also, if you do a direct lookup against the Consul API, you can get the port that way.

But many protocols, including HTTP, predate SRV records considerably, and do DNS A lookups, which return only IP addresses.

This means there’s nothing you can put in a web browser’s address bar, or indeed in the URL field of a generic HTTP client, to have it auto-discover the port to connect to.