Search code examples
mesos

Apache Mesos Schedulers and Executors by example


I am trying to understand how the various components of Mesos work together, and found this excellent tutorial that contains the following architectural overview:

enter image description here

I have a few concerns about this that aren't made clear (either in the article or in the official Mesos docs):

  • Where are the Schedulers running? Are there "Scheduler nodes" where only the Schedulers should be running?
  • If I was writing my own Mesos framework, what Scheduler functionality would I need to implement? Is it just a binary yes/no or accept/reject for Offers sent by the Master? Any concrete examples?
  • If I was writing my own Mesos framework, what Executor functionality would I need to implement? Any concrete examples?
  • What's a concrete example of a Task that would be sent to an Executor?
  • Are Executors "pinned" (permanently installed on) Slaves, or do they float around in an "on demand" type fashion, being installed and executed dynamically/on-the-fly?

Solution

  • Great questions! I believe it would be really helpful to have a look at a sample framework such as Rendler. This will probably answer most of your question and give you feeling for the framework internal.

    Let me now try to answer the question which might be still be open after this.

    • Scheduler Location

    Schedulers are not on on any special nodes, but keep in mind that schedulers can failover as well (as any part in a distributed system).

    • Scheduler functionality

    Have a look at Rendler or at the framework development guide.

    • Executor functionality/Task

    I believe Rendler is a good example to understand the Task/Executor relationship. Just start reading the README/description on the main github page.

    • Executor pinning

    Executors are started on each node when the first Task requiring such executor is send to this node. After this it will remain on that node.

    Hope this helped!