tl;dr: mesos/marathon run the tasks, consul exposes the tasks in DNS.
Both Mesos and Marathon store different views of task state on the cluster.
How do we use this data to make it easy for jobs to find one another? Can we use this information to automatically configure things like Load balancers?
This is where tools like consul and mesos-dns come in. They populate a DNS store, so that task-name becomes something like task-name.example.com. If you are running 10 copies of a service across different hosts, DNS will have 10 entries.
If a container moves to another system, DNS is updated on the fly.
We can embed health checks with consul, so that if a service is unhealthy, it gets pulled out of DNS.
Consul also is nice because the edges perform the checks (instead of a central server), so the load is distributed.
Both Mesos and Marathon store different views of task state on the cluster.
How do we use this data to make it easy for jobs to find one another? Can we use this information to automatically configure things like Load balancers?
This is where tools like consul and mesos-dns come in. They populate a DNS store, so that task-name becomes something like task-name.example.com. If you are running 10 copies of a service across different hosts, DNS will have 10 entries.
If a container moves to another system, DNS is updated on the fly.
We can embed health checks with consul, so that if a service is unhealthy, it gets pulled out of DNS.
Consul also is nice because the edges perform the checks (instead of a central server), so the load is distributed.