Work with Mesos distributed architectures _ Distributed

Source: Internet
Author: User
Tags zookeeper ruby on rails apache mesos jenkins ci

Absrtact: In 2010, a project designed to address the problem of scaling up--apache Mesos, which abstracts CPU, memory, and disk resources to some extent, allowing the entire data center to function as a single large server. Without virtual machines and operating systems, Mesos created a single, low-level cluster to provide the required resources for applications.

Introduction: In 2010, a project designed to address the problem of scaling up--apache Mesos, which abstracts CPU, memory, and disk resources to some extent, allowing the entire data center to function as a single large server. Without virtual machines and operating systems, Mesos created a single, low-level cluster to provide the required resources for applications.
This article will give you a brief introduction to Mesos distributed architecture, detailed discussion see "Mesos Combat" book.

The

Mesos provides a way to manage the entire data center, like managing a single large server, by introducing a layer of abstraction. You can assume that Mesos is similar to today's virtualization solution: Abstract physical CPUs, memory, disk resources like hypervisor, and then render as virtual machines. Mesos do the same thing, but it provides the resources directly to the application.
In addition to increasing overall resource utilization, Mesos supports distributed, high availability, and fault tolerance at the outset. Through the use of container technology, such as Linux control groups (cgroups) and Docker,mesos to achieve interprocess isolation, allowing multiple applications to run on the same machine. You may have built three clusters, running the memcached, Jenkins CI, and Ruby on Rails apps, and now you can just deploy a mesos cluster to run all the apps.
to provide scale services, Mesos provides a distributed, fault-tolerant architecture to achieve fine-grained allocation of resources. The architecture consists of three components: master, slave, and the application itself (often called the framework) running on it. Mesos relies on Apache zookeeper, a distributed data storage system dedicated to coordinated leader polling in the cluster, and slave discovery between Mesos master, leader, and the framework.
in the following illustration, you can see how these architectural components work together to provide a stable platform for deploying applications.

Mesos frame composition, including one or more master, slave, and framework masters

Mesos Master is responsible for managing the Mesos slave daemon running on each machine in the cluster. By zookeeper and master, which node is the master master and which nodes exist as standby, they will take over the service while the master master is offline.
The Master master node uses an pluggable allocation module or scheduling algorithm to distribute resources to various schedulers to determine what resources are available to a particular framework. The scheduler decides to receive or reject a resource supply based on whether it has a task to perform.
The Mesos cluster requires at least one master node. In a production environment to ensure high availability, three or more master nodes are recommended. You can run the zookeeper on the same machine as master, or use an independent zookeeper cluster. Slaves

The servers responsible for the implementation of the framework tasks in the cluster are called Mesos slave nodes, which access zookeeper to determine the master Master node and announce the CPU, memory, and storage resources to the master Master in the form of a resource supply. When the scheduler receives a resource supply from the Master master, it starts with one or more actuators on the slave node, and the executor is responsible for running the framework's tasks.
Mesos slave can also be configured based on attributes and resources, allowing them to tailor specific environments. A property configuration is a form of key-value pairs that can contain information similar to the location of the computer room where the node resides. The resource configuration can replace the Mesos automatically detect the slave node's effective resources, and the user specifies the specific CPU, memory, disk resource information. Sample information about property configuration and resource configuration is as follows:

--attributes= ' datacenter:pdx1;rack:1-1;os:rhel7 '
--resources= ' cpu:24;mem:24576;disk:409600 '

The data Center, node location, and operating system of the Mesos node are described in the property configuration, and the user specifies the CPU, memory, and disk resources provided by the node in the resource configuration. In day-to-day maintenance, this information is especially useful for ensuring that applications are not affected by online operation. Using these configuration information, the data center's operations personnel can be in the entire cabinet or even the entire row of cabinets offline day-to-day maintenance does not affect the user. Frameworks

The framework is the term used to represent Mesos, which is responsible for scheduling and executing tasks on the cluster. The framework consists of two components: Scheduler and executor. 1. Dispatch device

Scheduler is a typical long running state service that is responsible for connecting with Mesos master, receiving or rejecting resource supplies. Instead of trying to schedule all of your tasks to execute, Mesos delegated responsibility for the schedule to the framework. The scheduler determines whether to accept or reject a resource supply based on whether the current task requires it to run. The scheduler probes the presence of Master Master by communicating with zookeeper, and then registers itself in master. 2. Actuator

The executor is a process that starts on the Mesos slave and is responsible for running the framework's tasks. At the time of writing, Mesos's built-in actuators allow the framework to execute shell scripts, Docker containers, and so on. Mesos supports a variety of programming language actuators, and new actuators can be bound to the framework, which is acquired by Mesos Slave from the framework when the task requires it.
As you can see, Mesos provides a distributed, highly available architecture, Master is responsible for the scheduling of the entire cluster, slave notifies the scheduler of effective resources, and performs tasks in the cluster.
Original link

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.