Recommended way to discover current master

2015-08-31 Thread Philip Weaver
My framework knows the list of zookeeper hosts and the list of mesos master hosts. I can think of a few ways for the framework to figure out which host is the current master. What would be the best? Should I check in zookeeper directly? Does the mesos library expose an interface to discover the

Re: Recommended way to discover current master

2015-08-31 Thread James Peach
> On Aug 31, 2015, at 10:25 AM, Philip Weaver wrote: > > My framework knows the list of zookeeper hosts and the list of mesos master > hosts. > > I can think of a few ways for the framework to figure out which host is the > current master. What would be the best?

Re: Recommended way to discover current master

2015-08-31 Thread Marco Massenzio
The easiest way is via accessing directly Zookeeper - as you don't need to know a priori the list of Masters; if you do, however, hitting any one of them will redirect (302) to the current Leader. If you would like to see an example of how to retrieve that info from ZK, I have written about it

Re: Recommended way to discover current master

2015-08-31 Thread Philip Weaver
Excellent, thank you both! On Mon, Aug 31, 2015 at 10:39 AM, Marco Massenzio wrote: > The easiest way is via accessing directly Zookeeper - as you don't need to > know a priori the list of Masters; if you do, however, hitting any one of > them will redirect (302) to the

Re: Recommended way to discover current master

2015-08-31 Thread Connor Doyle
It's also worth noting the existence of the `mesos-resolve` binary, which can turn a canonical Mesos ZK string into the leading master location. -- Connor > On Aug 31, 2015, at 10:39, Marco Massenzio wrote: > > The easiest way is via accessing directly Zookeeper - as you

Re: Recommended way to discover current master

2015-08-31 Thread Christos Kozyrakis
If you have mesos DNS there, access leader.mesos :) Sent from Christos' phone. > On Aug 31, 2015, at 10:25 AM, Philip Weaver wrote: > > My framework knows the list of zookeeper hosts and the list of mesos master > hosts. > > I can think of a few ways for the