Skip to content
Switch branches/tags
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Mesos -> NS1 connector

This project is deprecated and we do not encourage you to use it.


This simple, experimental connector enables DNS based service discovery for Apache Mesos clusters via the NS1 platform. NS1 is a modern DNS and traffic management platform with delivery via a global Managed DNS network or on-prem/cloud Dedicated DNS deployments, and is suitable for performance sensitive, mission critical use cases.

This connector is inspired by the Mesos-DNS project and follows a similar approach, polling the Mesos master for cluster state, generating a set of DNS records based on the state, and (unlike Mesos-DNS, which acts as a simple nameserver itself), pushing the DNS records to the NS1 platform. NS1 propagates new and updated records to Managed and Dedicated DNS deployments in milliseconds, after which the latest Mesos state is represented for discovery via your domains serviced by NS1.

The set of records generated by the connector is identical to those generated by Mesos-DNS.

The connector is not a server -- it is a simple command line tool suitable to be run regularly, e.g. as a cron job.


Tested on Python 2.7.x with Mesos 0.28.0

Requires zbase32, requests, argparse, and the NS1 Python module


You must first create an (empty) zone in your NS1 account for your Mesos cluster, e.g. yourcompany.mesos,, or similar. All service discovery records will be created within the zone.

You must also create an NS1 API Key. It is recommended to grant the minimum necessary permissions to the API Key.

Run the connector like:

./ -m <list of mesos masters> -k <NS1 key> -z <zone name>

For example:

./ -m,, -k qACMD09OJXBxT7XOuRs8 -z

To see other options, run:

./ -h

To debug or verify everything is working, run with verbose/debug logging using -vvv. You will see lots of output including the full Mesos cluster state, the resulting DNS record set, and all API calls to NS1. You can also view the zone in the NS1 portal to confirm the correct sets of records have been created.

For ongoing usage, it is recommended to run the connector via cron or a similar scheduling tool every minute -- more often if you operate a very dynamic environment, less often if your environment is very static and you don't have strict service discovery requirements.

Also note that if you are using NS1's Managed DNS network and querying the records via your DNS resolver, you will need to run the connector with a registered domain for which NS1 has been made authoritative using the nameservers assigned when you create the zone.


MIT License


Mesos -> NS1 connector for service discovery




No releases published


No packages published