Mesos架構{轉}
![架構圖](https://github.com/mesos/mesos/wiki/images/architecture3.jpg)
The above figure shows the main components of Mesos. Mesos consists of a master daemons that manages slave daemons running on each cluster node, and mesos applications (also called frameworks) that run tasks on these slaves.
The master enables fine-grained sharing of resources (cpu, ram, ...) across applications by making them resource offers. Each resource offer contains a list of <slave ID, resource1: amount1, resource2, amount2, ...>. The master decides how many resources to offer to each framework according to a given organizational policy, such as fair sharing, or strict priority. To support a diverse set of policies, the master employs a modular architecture that makes it easy to add new allocation modules via a plugin mechanism.
A framework running on top of Mesos consists of two components: a scheduler that registers with the master to be offered resources, and an executor process that is launched on slave nodes to run the framework's tasks (see the [[App/Framework development guide]] for more details about application schedulers and executors). While the master determines how many resources are offered to each framework, the frameworks' schedulers select which of the offered resources to use. When a frameworks accepts offered resources, it passes to Mesos a description of the tasks it wants to run on them. In turn, Mesos launches the tasks on the corresponding slaves.
Example of resource offer
The figure below shows an example of how a framework gets scheduled to run a task.
![](https://github.com/mesos/mesos/wiki/images/architecture-example.jpg)
Let's walk through the events in the figure.
- Slave 1 reports to the master that it has 4 CPUs and 4 GB of memory free. The master then invokes the allocation policy module, which tells it that framework 1 should be offered all available resources.
- The master sends a resource offer describing what is available on slave 1 to framework 1.
- The framework's scheduler replies to the master with information about two tasks to run on the slave, using <2 CPUs, 1 GB RAM> for the first task, and <1 CPUs, 2 GB RAM> for the second task.
- Finally, the master sends the tasks to the slave, which allocates appropriate resources to the framework's executor, which in turn launches the two tasks (depicted with dotted-line borders in the figure). Because 1 CPU and 1 GB of RAM are still unallocated, the allocation module may now offer them to framework 2.
In addition, this resource offer process repeats when tasks finish and new resources become free.
While the thin interface provided by Mesos allows it to scale and allows the frameworks to evolve independently, one question remains: 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. A framework will reject the offers that do not satisfy its constraints and accept the ones that do. In particular, we have found that a simple policy called delay scheduling \cite{delay-scheduling}, in which frameworks wait for a limited time to acquire nodes storing the input data, yields nearly optimal data locality.
You can also read much more about the Mesos architecture in this [[technical paper|http://mesos.berkeley.edu/mesos_tech_report.pdf]].
相關文章
- 『高階篇』docker之Mesos叢集架構圖(23)Docker架構
- BIEE架構(轉)架構
- 玩轉架構之路架構
- 利用Mesos構建多工排程系統
- 容器架構轉傳統lnmp架構(失敗篇)架構LNMP
- MySQL主從複製架構轉換MGR架構MySql架構
- .Net三層架構 (轉)架構
- 面向模式構建系統架構 (轉)模式架構
- Mini-Mesos:一個Mesos的測試基礎框架框架
- 蘇寧庫存架構轉變架構
- 轉:軟體架構入門架構
- 波士頓DICE架構(轉載)架構
- UNIX 安全構架經驗(轉)
- 微軟解決方案架構 (轉)微軟架構
- 大型網站架構之:MySpace的體系架構一(轉載)網站架構
- 大型網站架構之:MySpace的體系架構二(轉載)網站架構
- Twitter 宣佈拋棄 Mesos,全面轉向Kubernetes
- Twitter 宣佈拋棄 Mesos,全面轉向 Kubernetes
- 視訊教程:玩轉數人云Mesos排程器Swan
- 極簡架構模式-控制反轉架構模式
- 軟體架構分類(轉載)架構
- 什麼是軟體架構(轉)架構
- 構架Java併發模型框架 (轉)Java模型框架
- 【細品架構10/100】架構由術至道的轉變(1)架構
- 【細品架構11/100】架構由術至道的轉變(2)架構
- Spark on Yarn 和Spark on MesosSparkYarn
- 架構之:serverless架構架構Server
- 從單體架構轉向CQRS - Wu架構
- Flume架構以及應用介紹[轉]架構
- 淺析大型網站的架構(轉)網站架構
- MFC架構下的DirectX8 (轉)架構
- PetShop4.0 架構說明(轉載)架構
- oracle架構的基礎知識(轉)Oracle架構
- 微軟解決方案架構(模組八) (轉)微軟架構
- 微軟解決方案架構(模組十) (轉)微軟架構
- Spring的web MVC 構架模式 (轉)SpringWebMVC模式
- 微軟解決方案架構(模組一) (轉)微軟架構
- 微軟解決方案架構(模組四) (轉)微軟架構