Mesos consists of
1) a master daemon that manages agent daemons running on each cluster node
Allocation policy module
Enables fine-grained sharing of resources (CPU, RAM, …) across frameworks by making them resource offers.
Each resource offer contains a list of <agent ID, resource1: amount1, resource2: amount2, ...>
2) Mesos frameworks that run tasks on these agents.
Mesos framework consists of:
a scheduler that registers with the master to be offered resources
an executor process that is launched on agent nodes to run the framework’s tasks
1. Mesos slave reports available resources to Mesos master.
2. Based on allocation policy module Mesos master decides which framework to allocate these resources to. For example, It allocated to Framework 1.
3. Framework1 is free to accept/deny offered resources. For example, it accepts the offer
4. Master sends the tasks to the slave and Framework1 executor takes over. Mesos master may allocate any unused resource to other frameworks.
Two-Level Scheduling
Allocation Module decide resources for each framework
Framework Scheduler decide resources for each task
How can the constraints of a framework be satisfied without Mesos knowing about these constraints? For example, how can a framework achieve data locality without Mesos knowing which nodes store the data required by the framework? Mesos answers these questions by simply giving frameworks the ability to reject offers.
Scheduling Algorithm
Dominant Resource Fairness Algorithm (DRF)
DRF is a Min-Max Fairness Algorithm for heterogeneous resources
- CPU
- Memory
- IO
Similar Systems
YARN, Kubernetes, Docker Swarm
No comments:
Post a Comment