Resolving the Mesos Leading Master

后端 未结 1 1241
青春惊慌失措
青春惊慌失措 2021-01-18 18:53

We\'re using Mesos to run jobs on a cluster. We\'re using haproxy to point, e.g., mesos.seanmcl.com to a Mesos Master.

If that Master happens to not

1条回答
  •  野的像风
    2021-01-18 19:07

    You can use the approach used by Mesos itself to determine the Leading Master using Zookeeper communications.

    The idea is to use the membership labels in Zookeeper communications to determine the Leading Master, cache it and use it for the subsequent requests. Check the following links for the implementation:

    • Leading Master Detector Header
    • Leading Master Detector Implementation

    Here's an example code using CLI:

    • Mesos-Resolve

    Edit: Alternatively you can use the command resolve in Mesos-CLI which returns the host/port for the current Leading Master which uses Mesos-Resolve code located in the Mesos core:

    • Resolve Command

    0 讨论(0)
提交回复
热议问题