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架構
- Mesos Marathon能做什麼?理念是什麼?(轉)
- Twitter 宣佈拋棄 Mesos,全面轉向 Kubernetes
- Twitter 宣佈拋棄 Mesos,全面轉向Kubernetes
- 玩轉架構之路架構
- 利用Mesos構建多工排程系統
- MySQL主從複製架構轉換MGR架構MySql架構
- 容器架構轉傳統lnmp架構(失敗篇)架構LNMP
- 【細品架構10/100】架構由術至道的轉變(1)架構
- 【細品架構11/100】架構由術至道的轉變(2)架構
- Spark on Yarn 和Spark on MesosSparkYarn
- 極簡架構模式-控制反轉架構模式
- Flume架構以及應用介紹[轉]架構
- 從單體架構轉向CQRS - Wu架構
- 架構師帶你玩轉分散式鎖架構分散式
- 微雲視訊轉碼架構介紹架構
- PetShop的系統架構設計(一)(轉)架構
- 架構之:serverless架構架構Server
- 【細品架構4/100】架構之架構切分架構
- Mesos+Zookeeper+Marathon+Docker環境搭建Docker
- [轉] 淺析x86架構中cache的組織結構架構
- SaaS架構:流程架構分析架構
- 談談如何從資料湖(Data Lake)架構轉向資料網格(Data Mesh)架構架構
- 一起玩轉微服務(5)——分層架構微服務架構
- Halodoc的資料平臺轉型之Lakehouse架構架構
- 單體架構&微服務架構&中臺服務架構架構微服務
- 架構師修煉之道(二)——架構?設計?架構師?架構
- 前端架構之小小node架構前端架構
- 單體架構到垂直架構架構
- 架構之:資料流架構架構
- 架構架構
- 架構演進之「微服務架構」架構微服務
- MySQL 高可用架構之 MMM 架構MySql架構
- 【架構分析】MESA (EGL/GLES)架構分析架構
- 架構之:軟體架構漫談架構
- 架構之:微服務架構漫談架構微服務
- 隱式呼叫架構風格的概念與應用(轉)架構
- 解決方案架構、系統架構和企業架構區別架構
- 架構C01: 什麼是架構?為什麼做架構?架構師需要做什麼?架構