Service Discovery / Internal Hostnames

As detailed in the documentation for private networking there are internal names for applications with the ability to scope and limit hosts based on region or distance.

However the issue is that the root name is the full applicaiton name, which must be unique even between organizations. I’m wondering how to give my apps names which are scoped to an organization so that the names are stable between organizations / private networks.

For example we have a staging organization where all app names are prefixed with product-staging- , e.g. product-staging-db or product-staging-queuemanager , however this means that we can’t simply define that the queuemanager service is located at queuemanager.internal as in staging the name is product-staging-queuemanager.internal

In production application names are prefixed with product- e.g. product-db and product-queuemanager, which means the names of services are different between environments.

What’s the best way to manage this so as to avoid having to give every service a list of env vars naming the locations of every other service in its current environment?

Is there any common approach to this? Maintain a wiki page with all your internal service names? Use a prefix and hope no former employee decides to squat all over your namespace?

I think an internal app name for DNS purposes which defaults to but is separate from the globally-unique app name would be perfect.

1 Like