Skip to main content

Internal Name

The internal name is the address other projects in the network use to call a service: <name>.zero.internal. It exists only inside the network of the service's environment, is unique in it, and is resolved by the network of whoever asks — two networks can each have their own api.zero.internal, and each project sees the one of its own network.

The name opens no access: it resolves for any project in the network, and only a project with permission reaches the service.

Before You Start​

  • The service's environment must be in a network.
  • Only web applications and internal services get a name. Continuous processes and scheduled tasks receive no connections, and a name for them would promise what does not exist.

Step by Step​

In the project, on the Project network screen, under Internal addresses of this project, choose each service's Name on the network. The screen suggests one: the project's name, when the environment has a single service that can get a name, or <service>-<project>, when it has more than one. The suggestion is never saved on its own — registering is always your call.

With the CLI:

zero services internal-name <service> orders # prints orders.zero.internal
zero services internal-name <service> --remove # removes the name

Callers use the name and the service's port:

curl http://orders.zero.internal:8080/health

A new name starts resolving on the network within about a minute.

The Rules of the Name​

  • 1 to 63 characters: lowercase letters, digits and hyphens, starting with a letter and not ending with a hyphen.
  • It cannot be zero, start with zero-, or be localhost, hostmaster, ns, ns1 or dns.
  • It is unique in the network: neither another service nor an internal entry in the same network can have the same name.
  • A service has one name only.

When the Name Stops Applying​

Removing the name, taking the environment out of the network, or deleting the internal entry releases the name immediately. Anyone who can change a project in the same network can register it for another service, and whoever keeps calling by that name starts talking to the new owner — and only gets there with permission for it.

Common Errors​

SymptomCauseWhat to do
"That name is already in use"Another service or an internal entry in the same network uses the namePick another name
"This name is reserved"The name belongs to the platformPick another name
"This service is not in any network"The service's environment is not in a networkAdd the environment to a network and register the name again
The name resolves, but the connection does not completeThe permission for the service is missingAsk the service owner to authorize your project
The name does not resolveThe asking project is in another network, or in none; or the name was registered less than a minute agoCheck the environment's network under Project network

Next Steps​