Container DNS Hostnames

DNS Hostnames for Direct Connection to Containers

Each newly created platform node receives automatically generated DNS hostnames that point to the appropriate internal or external IP address. These names simplify direct access to individual containers, complete layers, and linked nodes.
Container DNS hostnames
Automatically generated hostnames provide convenient access to platform containers.

Hostnames for Specific Containers

Each container can be addressed through its internal IP using either of the following hostname formats:

node${nodeId}-${envName}.${platformDomain}
node${nodeId}.${envName}.${platformDomain}
${nodeId}Automatically generated numeric identifier assigned to the container.
${envName}Environment name specified during creation, not the environment alias.
${platformDomain}Domain name of the hosting provider’s PaaS installation.
Access ScopeBoth formats can be used for internal and external connections where network access is permitted.
Node ID shown in the dashboard
The node identifier is displayed in the platform dashboard.

Supplementary Hostnames by Node Type

Some certified stacks provide an additional stack-specific hostname prefix instead of the generic node prefix.

Supplementary prefixes are available only for domain formats that use a hyphen as the separator.
Node TypeStackAdditional Hostname
Custom containersDockerdocker${nodeId}-${envName}.${platformDomain}
DatabaseCassandracassandra${nodeId}-${envName}.${platformDomain}
DatabaseCouchDBcouchdb${nodeId}-${envName}.${platformDomain}
DatabaseMariaDBmariadb${nodeId}-${envName}.${platformDomain}
CacheMemcachedmemcached${nodeId}-${envName}.${platformDomain}
DatabaseMicrosoft SQL Servermssql${nodeId}-${envName}.${platformDomain}
DatabaseMySQLmysql${nodeId}-${envName}.${platformDomain}
DatabaseNeo4jneo4j${nodeId}-${envName}.${platformDomain}
DatabaseOrientDBorientdb${nodeId}-${envName}.${platformDomain}
DatabasePostgreSQLpostgres${nodeId}-${envName}.${platformDomain}
DatabaseRedisredis${nodeId}-${envName}.${platformDomain}
VPSElastic VPSvps${nodeId}-${envName}.${platformDomain}

Hostnames for Specific Layers

All internal IP addresses of containers within one node layer can be resolved through:

${nodeGroup}.${envName}.${platformDomain}

${nodeGroup} is the role-based name of the layer, such as an application-server, load-balancer, database, or cache layer.

Layer hostname format
A layer hostname resolves the containers belonging to that node group.
Extra layers: Additional layers receive indexed names such as cp2, cp3, and cp4. Generic extra layers use names such as extra, extra2, and extra3.

A DNS lookup command can be used to retrieve all application-server addresses for an environment:

host ${nodeGroup}.${envName}.${platformDomain}
Layer hostname lookup example
Use a DNS lookup to list the containers available in a layer.
DNS records for layer hostnames are updated automatically whenever a container is created or removed.

Short Hostnames within One Environment

New Docker containers and dockerised managed stacks support simplified DNS aliases within the same environment:

node${nodeId}
${nodeGroup}
  • node${nodeId} addresses one specific container.
  • ${nodeGroup} resolves the containers inside one layer.

These short names can be used in application code, server configuration files, SSH sessions, and commands such as ping, host, and dig.

Migration benefit: Short hostnames do not include the hardware-region domain, so applications can be migrated between regions without changing internal connection strings.

Hostnames for Linked Containers

Container links can expose linked-node hostnames and connection details through automatically generated environment variables. Applications can use these values to communicate with linked services without hardcoding their IP addresses.

  • Use the linked service alias as the logical connection name.
  • Read the generated hostname, port, and address values from the container environment.
  • Avoid hardcoded internal IP addresses because they are less portable than DNS aliases.
  • Review the container Links settings when a linked hostname is not available.
The exact linked-hostname variables depend on the aliases and ports defined in the container-link configuration.

What’s next?

  • Custom Domain Name
  • Environment Aliases
  • Container Links
  • Public IP
  • SSH Access