Mesos Architecture Introduction

Source: Internet
Author: User

1. Preface

Like most distributed systems, Apache Mesos uses the master/slave structure to simplify the design, to solve master single point of failure, to make master as lightweight as possible, All of the meta-data above can be reconstructed through the slave re-registration, so it is easy to solve the single point of failure by zookeeper.

( what is Apache Mesos?) Reference: "Unified resource management and scheduling platform (System) Introduction", this paper analysis based on Mesos SVN Revision 1327410)

2. Basic terminology Interpretation in Apache Mesos

(1) mesos-master: Mesos Master, primarily responsible for managing each framework and slave, and assigning resources on slave to each framework

(2) mesos-slave: Mesos Slave, responsible for the management of the various mesos-task on this node, for example: allocating resources for each executor

(3) Framework: Computing framework, such as: Hadoop,spark, through Mesosschedulerdiver access Mesos

(4) Executor: Actuator, mounted on mesos-slave, to start a task in the compute frame.

When users try to add a new computational framework to Mesos, a framework scheduler and executor are required to access Mesos.

3. Overall architecture

Apache Mesos consists of four components, namely mesos-master,mesos-slave,framework and executor.

Mesos-master is the core of the entire system and is responsible for managing the various frameworks that access Mesos (managed by Frameworks_manager) and slave (managed by Slaves_manager), The resources on the slave are assigned to the framework (managed by the independent plug-in module allocator) according to a policy.

Mesos-slave is responsible for receiving and executing commands from Mesos-master, managing mesos-task on nodes, and assigning resources to individual tasks. Mesos-slave sends its own amount of resources to mesos-master, which is determined by the allocator module in Mesos-master to which framework the resource is allocated, and the resources currently under consideration are both CPU and memory, that is, Mesos-slave will send the number of CPUs and the amount of memory to Mesos-master, and when the user submits the job, you need to specify the number of CPUs and the amount of memory required for each task, so that when the task runs, Mesos-slave will put the task into Linux with fixed resources Run in container to achieve the effect of resource isolation. Obviously, Master has a single point of failure, and for this reason, Mesos adopted zookeeper to solve the problem.

The framework refers to external computing frameworks, such as Hadoop,mesos, which can be registered to access Mesos for unified management and resource allocation mesos. Mesos requires that the accessible framework must have a scheduler module that is responsible for task scheduling within the framework. When a framework wants to access mesos, it needs to modify its scheduler to register with Mesos and get Mesos assigned to its own resources so that its own scheduler assigns those resources to tasks in the framework, which means The entire Mesos system uses a two-tier scheduling framework: The first layer, which allocates resources to the framework by Mesos, and the second layer, in which the framework's own scheduler allocates resources to its own internal tasks. Currently Mesos supports three languages written scheduler, respectively, C++,java and Python, in order to provide a unified access to various schedulers, Mesos internal C + + implementation of a Mesosschedulerdriver (scheduler drive), The framework scheduler can invoke the interface in the driver to interact with Mesos-master, completing a series of functions (such as registration, resource allocation, etc.).

The executor is primarily used to start tasks inside the framework. Because of different frameworks, the interface or way to start a task is different, when a new framework is to access Mesos, you need to write a executor that tells Mesos how to start a task in the framework. In order to provide a uniform actuator writing method for various frameworks, Mesos internally implements a Mesosexecutordiver (actuator driver) in C + +, which can be used by the framework to tell Mesos how to start a task via its associated interface.

4. References

(1) Mesos home: http://www.mesosproject.org/index.html

(2) Mesos code: https://svn.apache.org/repos/asf/incubator/mesos/trunk/

(3) Mesos:a Platform for fine-grained Resource sharing in the Data Center. B. Hindman, A. Konwinski, M. Zaharia, A. Ghodsi, A.D. Joseph, R. Katz, S. Shenker and I. Stoica, NSDI, March 2011.

Mesos Architecture Introduction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.