You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you run a replicated mesos-master setup (say N=3) then the current state of how you inform the HTTP API client of the masters is:
pick one, and use httpcli.Endpoint to save it
hope it never goes down
let the 307 redirection code ask any master for the leading master and update your favorite
This works ok enough until the selection from (1) is not responsive. Then you have to cobble together some sort of much higher level round-robin over a list of mesos-master addresses.
It would be cool if the httpcli.Client could take one of the following:
// NextEndpointFunc returns a new endpoint to try.
type NextEndpointFunc func() string
// example of NextEndpointFunc
func simpleRoundRobin(urls []string) httpcli.NextEndpointFunc {
var pos int
return func() string {
if pos >= len(urls) {
pos = 0
}
s := urls[pos]
pos++
return s
}
}
// EndpointProviderFunc could hook into a service-discovery option or flat config file
type EndpointProviderFunc func() []string
// example of EndpointProviderFunc from a flat file:
func staticHosts(urls []string) httpcli.EndpointProviderFunc {
return urls
}
And then have it rotate through the options down wherever c.url is referenced when there's an error indicative of a dead or bad master.
The text was updated successfully, but these errors were encountered:
If you run a replicated mesos-master setup (say N=3) then the current state of how you inform the HTTP API client of the masters is:
httpcli.Endpoint
to save itThis works ok enough until the selection from (1) is not responsive. Then you have to cobble together some sort of much higher level round-robin over a list of mesos-master addresses.
It would be cool if the
httpcli.Client
could take one of the following:And then have it rotate through the options down wherever
c.url
is referenced when there's an error indicative of a dead or bad master.The text was updated successfully, but these errors were encountered: