Mesos-consul is used to register and deregister services that run as Mesos tasks.
For example, if you have a Mesos task called myapp
, then this program will register the application in Consul, which will expose DNS as myapp.service.consul
. Consul also does the Mesos leader discovery through the leader.Mesos.service.consul
DNS, which points to the active leader.
How is this different from other service discovery software?
Mesos-dns is a project similar to Consul. In Mesos-dns, it polls Mesos to get information about the tasks, whereas with Consul, instead of exposing this information via a built-in DNS server, it populates the Consul Service discovery with this information. The services are then exposed by Consul through DNS and its REST endpoint.