}}

Mesos-DNS provides service discovery within DC/OS clusters. It is fully integrated into DC/OS and allows applications and services on the cluster to find each other through the domain name system (DNS), similar to how services discover each other throughout the Internet.

Applications launched by Marathon are assigned names such as search.marathon.mesos or log-aggregator.marathon.mesos. Mesos-DNS resolves names to both the IP address of the node and the ports that the application is using. DC/OS applications and services discover the IP addresses and ports of other applications by making DNS queries or by making HTTP requests through a REST API.

Design

Mesos-DNS is designed for reliability and simplicity. It requires little configuration and is automatically pointed to the DC/OS master nodes at launch. Mesos-DNS periodically queries the masters (every 30 seconds by default) to retrieve the state of all running tasks from all running services, and to generate A and SRV DNS records for these tasks. As tasks start, finish, fail, or restart on the DC/OS cluster, Mesos-DNS updates the DNS records to reflect the latest state.

If the Mesos-DNS process fails, systemd automatically restarts it. Mesos-DNS then retrieves the latest state from the DC/OS masters and begins serving DNS requests without additional coordination. Mesos-DNS does not require consensus mechanisms, persistent storage, or a replicated log because it does not implement heartbeats, health monitoring, or lifetime management for applications; this functionality is already built in to the DC/OS masters, agents, and services.

You can load balance DNS requests in clusters with large numbers of agents by adding additional master nodes; no additional configuration is necessary.

As shown in the diagram, Mesos-DNS optionally integrates with your existing DNS infrastructure. Mesos-DNS replies directly to lookup requests from agent nodes for applications and services within your DC/OS cluster. If an agent node makes a DNS request for a hostname that is outside your DC/OS cluster, Mesos-DNS queries an external nameserver. External nameservers are only required if DC/OS cluster nodes must resolve hostnames for systems elsewhere on your network or on the Internet.

Service Naming

Mesos-DNS defines the DNS top-level domain .mesos for Mesos tasks that are running on DC/OS. Tasks and services are discovered by looking up A and, optionally, SRV records within t...

HTTP Interface

Mesos-DNS implements a simple REST API for service discovery over HTTP: GET /v1/version Lists in JSON format the Mesos-DNS version and source code URL. curl http://10.190.238.173:8...

Using Custom Top-Level Domains for Mesos-DNS

DC/OS uses Mesos-DNS for internal service discovery. While the .mesos domain can be used to reach services in DC/OS, an additional instance of Mesos-DNS must be running to support ...

Exposing Mesos Zones Outside

There are cases where you may want to have services outside of DC/OS that use DNS records inside of the DC/OS cluster. However, the .mesos domain name that DC/OS uses to expose rec...

Troubleshooting

How can I check the Mesos-DNS version? You can check the Mesos-DNS version with mesos-dns -version. Note: We do not recommend upgrading Mesos-DNS independently of DC/OS. Use the ve...