Introducing Apache Mesos

Click here to load reader

  • date post

  • Category


  • view

  • download


Embed Size (px)

Transcript of Introducing Apache Mesos


    Introducing Apache Mesos

    Matthias FurrerBruno Fuss

    A modern cluster manager optimizing resource utilization

  • Agenda

    TechEvent March 2017 - Introducing Apache Mesos2 03/2017

    1. IntroductionArchitecture (components)DistributionsOther Offerings

    2. FrameworksService Scheduling andManagement FrameworksBig Data Frameworks

    3. HA ComponentsZookeeperMarathon

    3. ConfigurationMesosMarathonKafka

    4. Live DemoMesosKafka

    5. SummaryUse Cases / Benefits

  • TechEvent March 2017 - Introducing Apache Mesos3 03/2017


  • Introducing Apache MesosA software layer to aggregate servers into one processing unit

    TechEvent March 2017 - Introducing Apache Mesos4 03/2017

    Distributed Cluster Management Software

    System Resources (Memory, Storage) abstraction from Hardware

    Metascheduler (scheduler of schedulers)

    Distributed Systems Kernel / Distributed Datacenter OS

    Supports Mesos and Docker Containers

    Open Source

    Runs under Apache License 2.0

    Cross Plattform

    Written in C++

    Runs on Linux/Posix systems, Experimental for Windows

  • Architecture - Features

    TechEvent March 2017 - Introducing Apache Mesos5 03/2017


    Scales up to over 50000 nodes

    Resource isolation

    Linux cgroups or Docker containers


    Resource scheduling accross multiple frameworks/applications

    High availability

    Uses Apache Zookeeper (distributed configuration and synchronization service)

    Monitoring Interface

    Web UI

  • Components

    TechEvent March 2017 - Introducing Apache Mesos6 03/2017


    Mediating agent resources


    Manage resources on individual nodes and executestasks



    Systems running on mesos consisting of a scheduler and an

    executor (e.g. Spark, Storm ,Cassandra)


    Fault tolerant job scheduler, can handle dependencies - acts

    as a cron for mesos


    Framework for running long-running services init.d for


  • Architecture High Level Overview

    TechEvent March 2017 - Introducing Apache Mesos7 03/2017

    Zookeeper ensures high availability of masters

    Master daemon manages agent (slave) daemons

    Mesos frameworks run tasks on agents (slaves)

    Master decides how many resources to offer to each framework according to a given organizational policy (e.g fair sharing or strict priority).

    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 agent nodes to run the frameworks taskSource:

  • Architecture Resource Offering

    TechEvent March 2017 - Introducing Apache Mesos8 03/2017

    1. Agent 1 reports to the master that it has 4 CPUs and 4 GB of memory free. The master then invokes the allocation policy module

    2. The master sends a resource offer describing what is available on agent 1 to framework

    3. The frameworks scheduler replies to the master with information about two tasks to run on the agent

    4. Master sends the tasks to the agent, which allocates appropriate resources to the frameworks executor, which launches the two tasks. Because CPU/RAM Resources are still unallocated, the allocation module may now offer them to framework 2.


  • Distributions Mesosphere DC/OS

    TechEvent March 2017 - Introducing Apache Mesos9 03/2017

    Commercial version: Mesosphere Datacenter Operating System

    Open Source version: DC/OS available - derived from Mesospheres Datacenter Operating System

    Based on Mesos and Marathon

    Supports Docker as well as native Mesos containers

    Container orchestration capabilities for Docker and Mesos containers including automatic workload recovery, security, networking, service discovery

    Push-button installation of complex distributed systems (including HDFS, Apache Spark, Apache Kafka, Apache Cassandra and more) with DC/OS Universe

    Runs on bare-metal, virtual (vSphere or OpenStack) and cloud (AWS, Azure, GCE)

  • Other Offerings

    TechEvent March 2017 - Introducing Apache Mesos10 03/2017

    Kubernetes (Google / Cloud Native Computing Foundation CNCF)

    Docker Swarm (Docker, Inc.)

    Rkt fleet (CoreOS, Inc.)

    Shipyard (Shipyard Project)

    CloudSlang (Hewlett Packard Enterprise)

    Ranger (Ranger Labs)

    Azure Service Fabric (Microsoft)

  • TechEvent March 2017 - Introducing Apache Mesos11 03/2017


  • Service Scheduling and Management Frameworks

    TechEvent March 2017 - Introducing Apache Mesos12 03/2017


    Launch and monitor long-running applications. Controlling a high availability environment, checking the applications' health and restarting services if nodes go down


    Distributed, fully fault-tolerant job scheduler. Can interact with systems (e.g. Hadoop) even if the Mesos worker machine does not have the system installed

    Apache Aurora

    Manages long-running services, cron jobs, and ad-hoc jobs


    Service Discovery and orchestration

  • Big Data Frameworks

    TechEvent March 2017 - Introducing Apache Mesos13 03/2017

    Apache Hadoop

    Distributed Data Processing, MapReduce and Distributed File System (HDFS)

    Apache Spark

    Execution engine for large-scale data processing. Batch processing, iterative processing, near real-time processing, and stream processing. Caching data in memory with Resilient Distributed Datasets (RDD)

    Apache Storm

    Real-time distributed stream event-processing engine

    Apache Cassandra

    Open source scalable NoSQL database. Provides query language Cassandra Query Language or CQL to communicate with database

  • Big Data Frameworks (II)

    TechEvent March 2017 - Introducing Apache Mesos14 03/2017

    Apache Kafka

    distributed publish-subscribe messaging system designed for speed, scalability, reliability, and durability

    Apache Samza

    Distributed stream processing framework. Using Kafka for messaging and Hadoop YARN for resource management

    Elasticsearch-Logstash-Kibana (ELK) stack

    End-to-End log analytics solution: Elasticsearch for search capabilities, Logstashas a log management software and Kibana as the visualization layer

    Mesos API

    Develop custom frameworks schedulers and executors

  • TechEvent March 2017 - Introducing Apache Mesos15 03/2017

    High Availability


  • Apache Zookeeper

    TechEvent March 2017 - Introducing Apache Mesos16 03/2017


    is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.

    Independent Apache Project


    Central Key/Value Store

    Containing additional Information like time stamps, versioning,



    Designed for High Availability

  • Apache Zookeeper

    TechEvent March 2017 - Introducing Apache Mesos17 03/2017

    High Availability

    one Leader

    two or more Followers



  • Apache Zookeeper

    TechEvent March 2017 - Introducing Apache Mesos18 03/2017

    Data Model

    Hierarchical Namespace

    Z-Nodes (Zookeeper Nodes)

    Nodes identified by Path

    Ex.: /app1/p_1

    Ephemeral Nodes

    Leader Election

    Conditional updates and watches

    Atomic Transactions

  • Apache Zookeeper on Mesos

    Zookeeper takes hand in everywhere Mesos needs to store and call up distributeddynamic information

    Service Locations

    Service States

    Client Notifications

    Leader election for Mesos Masters and Frameworks (e.g. Marathon, etc.)

    03/2017 TechEvent March 2017 - Introducing Apache Mesos19

  • Marathon

    Marathon is a Apache Mesos framework for container orchestration

    designed for long running and stateful Apps (e.g. Database, App. Server, etc.)

    Marathon is a meta framework

    used for managing other Mesos Frameworks (Chronos, Storm, )

    Container Support

    Mesos Containers (default)

    Docker Constainers (must be configured)

    03/2017 TechEvent March 2017 - Introducing Apache Mesos20

  • Marathon


    High Availability


    Service Discovery & Load Balancing (Mesos-DNS, Marathon-LB)

    Health Checking

    Event Subscription

    User Interfaces for managing services (start, stop, check, )

    Marathon UI (GUI)


    Basic Security (Authorisation, SSL, )

    03/2017 TechEvent March 2017 - Introducing Apache Mesos21

  • Marathon Example

    Mesos Master and Agents (Slaves), Zookeeper and Marathon started by OS on each server (initd, systemd)

    Marathon starts frameworks on Mesos Agents (Chronos, JBoss, Jetty, Rails)

    Chronos, a fault tolerant job scheduler acts itself as frameworkand starts jobs (e.g. dumps a database, send Emails)

    03/2017 TechEvent March 2017 - Introducing Apache Mesos22

  • TechEvent March 2017 - Introducing Apache Mesos23 03/2017

    Installation & Configuration

  • Installing and Configuring Apache Mesos