A New Service Discovery Tool for Use with Apache Mesos

by Ostatic Staff - Jan. 21, 2015

Recently, Mesosphere has been covered here on OStatic in a series of posts, including an interview with the company's Ben Hindman, in which he discusses the need for a "data center operating system." Mesosphere's data center operating system is built on the open source Apache Mesos project, which is being leveraged by many organizations for distributed resource and network management.

Now Mesoshpere has contributed a new, related project to open source: Mesos-DNS, a stateless DNS server for Mesos. The tool provides service discovery as an essential building block to connect applications and services.

According to a post on Mesos-DNS:

"At its simplest, service discovery is the mechanism by which an application or service can "discover" where other applications and services are located so that they can be connected. In a datacenter managed by Mesos, service discovery is especially important because applications and services are placed on machines (and sometimes moved) based on real time scheduling decisions as Mesos scales them out or restarts them after a machine failure. In such a dynamic environment, it is difficult for applications and services to find and keep up with the location of other applications and services they rely on."

 "Until now, each user of Mesos was required to choose their own service discovery mechanism, or to use a patchwork of mechanisms supplied by different frameworks. Mesos-DNS offers a service discovery system purposely built for Mesos. It allows applications and services running on Mesos to find each other with DNS, similarly to how services discover each other throughout the Internet. Applications launched by Marathon or Aurora are assigned names like search.marathon.mesos or log-aggregator.aurora.mesos. Mesos-DNS translates these names to the IP address and port on the machine currently running each application. To connect to an application in the Mesos datacenter, all you need to know is its name. Every time a connection is initiated, the DNS translation will point to the right machine in the datacenter."

 As Ben Hindman explained in our recent interview with him about the power of Mesos: "[Mesos] provides the basic primitives of the DCOS, including starting and stopping applications - and the bridge between applications and the hardware. f you’re in the cloud, you might be buying 8 core machines but only using 2 cores. Your cloud provider is really the one benefiting from virtualized resources, not you! The datacenter operating system enables you to more fully utilize your machines by automating the placement of your applications across your machines, using as many resources as it can per machine."

 You can find out more about Mesos-DNS here, and the following diagram depicts how it works: