2. 2KrDAG – ZIGI zigispace.netKrDAG – ZIGI zigispace.net
Introduce
Mesos
Apache Mesos abstracts CPU, memory, storage, and other compute
resources away from machines (physical or virtual), enabling fault-tolerant
and elastic distributed systems to easily be built and run effectively.
Mesos is built using the same principles as the Linux kernel, only at a
different level of abstraction. The Mesos kernel runs on every machine and
provides applications with API’s for resource management and scheduling
across entire datacenter and cloud environments.
3. 3KrDAG – ZIGI zigispace.netKrDAG – ZIGI zigispace.net
소개
메소스
Mesos는 Machine(혹은 Node)의 자원(CPU, Memory, Storage 등) 을 공유해서 사용.
일종의 데이터센터 자원의 커널
Cloud Infrastructure 및 Computing Engine들의 자원을 통합적 으로 관리 할 수 있도록
만든 자원관리 프로젝트.
4. 4KrDAG – ZIGI zigispace.netKrDAG – ZIGI zigispace.net
• UC Berkeley에서 Nexus 라는 이름으로 개발이 진행되던 프로젝트.
• Mesos라는 이름으로 Apache 재단에 오픈소스로 발표.
• Mesos를 활용 기업
Mesos
History &Reference
5. 5KrDAG – ZIGI zigispace.netKrDAG – ZIGI zigispace.net
• Scalability to 10,000s of nodes
• Fault-tolerant replicated master and slaves using ZooKeeper
• Support for Docker containers
• Native isolation between tasks with Linux Containers
• Multi-resource scheduling (memory, CPU, disk, and ports)
• Java, Python and C++ APIs for developing new parallel applications
• Web UI for viewing cluster state
Mesos
Features
6. 6KrDAG – ZIGI zigispace.netKrDAG – ZIGI zigispace.net
• 인프라에 대한 Utility를 향상 시켜, 비용 감소
• 개발자 관점에서 리소스에 대한 View를 단순화 함.
• 다양한 워크로드를 수행할 수 있는 프레임워크를 지원
• 특정 OS 혹은 벤더에 Lock-In되지 않기 때문에 H/W나 OS 선택의 폭이 넓음.
Mesos
Why?
7. 7KrDAG – ZIGI zigispace.netKrDAG – ZIGI zigispace.net
Architecture : Master
Mesos
◦ Slave 리소스와 Framework 간의 중재 역할
◦ 안정성을 위해서 다수의 Master를 운영 가능
- Active 상태의 Master는 1대만 존재
- Master Active 선출/관리는 ZooKeeper 사용
- Active 이외의 Master는 Standby 상태 유지
◦ Master는 Framework가 Slave Resource를
사용할 수 있도록 제공.
8. 8KrDAG – ZIGI zigispace.netKrDAG – ZIGI zigispace.net
Architecture : Slave
Mesos
◦ Mesos 클러스터의 실제 작업(Task)을 수행
◦ 개별 노드에 대한 자원 관리 및 비즈니스 우선
순위를 반영하기 위한 자원 정책 구성.
9. 9KrDAG – ZIGI zigispace.netKrDAG – ZIGI zigispace.net
Architecture : Frameworks
Mesos
◦ 각 프레임워크는 스케줄러와 Executor로 구성.
◦ scheduler
- Master에 등록된 리소스를 사용하도록 등록.
◦ executor
- 슬레이브 노드에서 프레임워크 Task를
실행하기 위한 프로세스
11. 11KrDAG – ZIGI zigispace.netKrDAG – ZIGI zigispace.net
• Aurora is a service scheduler that runs on top of Mesos, enabling you
to run long-running services that take advantage of Mesos'
scalability, fault-tolerance, and resource isolation.
• Marathon is a private PaaS built on Mesos. It automatically handles
hardware or software failures and ensures that an app is “always on”.
• Singularity is a scheduler (HTTP API and web interface) for running
Mesos tasks: long running processes, one-off tasks, and scheduled
jobs.
• SSSP is a simple web application that provides a white-label
“Megaupload” for storing and sharing files in S3.
Mesos
Framework : Long Running Services
12. 12KrDAG – ZIGI zigispace.netKrDAG – ZIGI zigispace.net
• Cray Chapel is a productive parallel programming language. The Chapel Mesos scheduler lets you run Chapel
programs on Mesos.
• Dpark is a Python clone of Spark, a MapReduce-like framework written in Python, running on Mesos.
• Exelixi is a distributed framework for running genetic algorithms at scale.
• Hadoop Running Hadoop on Mesos distributes MapReduce jobs efficiently across an entire cluster.
• Hama is a distributed computing framework based on Bulk Synchronous Parallel computing techniques for massive
scientific computations e.g., matrix, graph and network algorithms.
• MPI is a message-passing system designed to function on a wide variety of parallel computers.
• Spark is a fast and general-purpose cluster computing system which makes parallel jobs easy to write.
• Storm is a distributed realtime computation system. Storm makes it easy to reliably process unbounded streams of
data, doing for realtime processing what Hadoop did for batch processing.
Mesos
Framework : Big Data Processing
13. 13KrDAG – ZIGI zigispace.netKrDAG – ZIGI zigispace.net
• Chronos is a distributed job scheduler that supports complex job
topologies. It can be used as a more fault-tolerant replacement for
Cron.
• Jenkins is a continuous integration server. The mesos-jenkins plugin
allows it to dynamically launch workers on a Mesos cluster depending
on the workload.
• JobServer is a distributed job scheduler and processor which allows
developers to build custom batch processing Tasklets using point and
click web UI.
Mesos
Framework : Batch Scheduling
14. 14KrDAG – ZIGI zigispace.netKrDAG – ZIGI zigispace.net
• Cassandra is a performant and highly available distributed database.
Linear scalability and proven fault-tolerance on commodity hardware
or cloud infrastructure make it the perfect platform for mission-
critical data.
• ElasticSearch is a distributed search engine. Mesos makes it easy to
run and scale.
• Hypertable is a high performance, scalable, distributed storage and
processing system for structured and unstructured data.
Mesos
Framework : Data Storage
15. 15KrDAG – ZIGI zigispace.netKrDAG – ZIGI zigispace.net
High availability
Mesos
Mesos is configured for high availability, the leading master will abort itself
when it discovers it has been partitioned away from the Zookeeper
quorum. This is a safety precaution to ensure the previous leader doesn’t
continue communicating in an unsafe state.
16. 16KrDAG – ZIGI zigispace.netKrDAG – ZIGI zigispace.net
• Master Quorum이 2N-1 일 때, N개 이상의 Master가 동작 중이어야 함.
• Master Quorum의 수량은 3 혹은 5개를 권고
Mesos
Master Quorum
Master Quorum Size Failure Tolerance
1 1 0
3 2 1
5 3 2
… … …
2N-1 N N-1
22. 22KrDAG – ZIGI zigispace.netKrDAG – ZIGI zigispace.net
Flow
Mesos
Step 5. Slave 서버는 해당 작업을 수행
Running
Slave
23. 23KrDAG – ZIGI zigispace.netKrDAG – ZIGI zigispace.net
Example of resource offer
Mesos
24. 24KrDAG – ZIGI zigispace.netKrDAG – ZIGI zigispace.net
Datacenter OS
25. 25KrDAG – ZIGI zigispace.netKrDAG – ZIGI zigispace.net
Datacenter operating system - DCOS
The DCOS runs in any
modern Linux environment:
public and private cloud,
virtual machines and bare
metal.
Built in to the DCOS, Mesos
pools your infrastructure,
automatically allocating
resources and scheduling
tasks based on demands
and policy.
Control your entire DCOS-
powered datacenter from a
single command line and a
single web user interface.
Run all your apps and
workloads, from PaaS-
based microservices to big
data to databases — and
everything in between.
33. 33KrDAG – ZIGI zigispace.netKrDAG – ZIGI zigispace.net
Etc.
Mesos
Pushing control to the frameworks has two benefits.
First, it allows frameworks to implement diverse approaches to various problems in
the cluster (e.g., achieving data locality, dealing with faults), and to evolve these
solutions independently. Second, it keeps Mesos simple and minimizes the rate of
change required of the system, which makes it easier to keep Mesos scalable and
robust.