Using network services and load balancing
Mesosphere provides a number of networking services that make orchestration easier. These services provide service discovery and load balancing for running applications.
Discovering services with DNS
Every service that is created is assigned a hostname in Mesos DNS. The entries are service-name.marathon.mesos
, where service-name
is the name of the service in the id
field. The following snippet is from a service with id
set to simple-nginx
. Mesos DNS would create a record named simple-nginx.marathon.mesos
:
{ "id" : "simple-nginx", ... }
Because the services are translated directly into DNS hostnames, there are a few restrictions, as follows:
First, names must only contain letters, numbers, and dash (
-
).Second, the names must be shorter than 24 characters. Longer names will be shortened. This can lead to problems if two services end up with the same hostname. Tasks running in one service may be returned for the other service...