chug: datacenter computing with apache mesos

31
Datacenter Computing with Apache Mesos CHUG @ Sears Holdings Corp, 2013-11-06 Paco Nathan, chief scientist http://Mesosphere.io @pacoid

Upload: paco-nathan

Post on 06-May-2015

4.968 views

Category:

Technology


0 download

DESCRIPTION

Mesos overview, presented at the Chicago Hadoop Users Group meetup at Sears Holdings Corp, 2013-11-06 video: https://vimeo.com/79016209 meetup: http://www.meetup.com/Chicago-area-Hadoop-User-Group-CHUG/events/144871252/

TRANSCRIPT

Page 3: CHUG: Datacenter Computing with Apache Mesos

Beyond Hadoop

Google has been doing datacenter computing for years, to address the complexities of large-scale data workflows:

• leveraging the modern kernel: isolation in lieu of VMs

• “most (>80%) jobs are batch jobs, but the majority of resources (55–80%) are allocated to service jobs”

• mixed workloads, multi-tenancy

• relatively high utilization rates

• JVM? not so much…

• reality: scheduling batch is simple; scheduling services is hard/expensive

Page 4: CHUG: Datacenter Computing with Apache Mesos

Beyond Hadoop

Hadoop – an open source solution for fault-tolerant parallel processing of batch jobs at scale, based on commodity hardware… however, other priorities have emerged for the analytics lifecycle:

• apps require integration beyond Hadoop

• multiple topologies, mixed workloads, multi-tenancy

• significant disruptions in h/w cost/performance curves

• higher utilization

• lower latency

• highly-available, long running services

• more than “Just JVM” – e.g., Python growth

keep in mind the priority for multi-disciplinary efforts, to break down silos – extending beyond a de facto “priesthood” of data engineering

Page 5: CHUG: Datacenter Computing with Apache Mesos

“Return of the Borg”

Return of the Borg: How Twitter Rebuilt Google’s Secret WeaponCade Metzwired.com/wiredenterprise/2013/03/google-borg-twitter-mesos

The Datacenter as a Computer: An Introduction to the Design of Warehouse-Scale MachinesLuiz André Barroso, Urs Hölzleresearch.google.com/pubs/pub35290.html

2011 GAFS OmegaJohn Wilkes, et al.youtu.be/0ZFMlO98Jkc

Page 6: CHUG: Datacenter Computing with Apache Mesos

“Return of the Borg”

Omega: flexible, scalable schedulers for large compute clustersMalte Schwarzkopf, Andy Konwinski, Michael Abd-El-Malek, John Wilkeseurosys2013.tudos.org/wp-content/uploads/2013/paper/Schwarzkopf.pdf

Page 8: CHUG: Datacenter Computing with Apache Mesos

Mesos – definitions

a common substrate for cluster computing

mesos.apache.org

heterogenous assets in your datacenter or cloud made available as a homogenous set of resources

• top-level Apache project

• scalability to 10,000s of nodes

• obviates the need for virtual machines

• isolation (pluggable) for CPU, RAM, I/O, FS, etc.

• fault-tolerant leader election based on ZooKeeper

• APIs in C++, Java, Python

• web UI for inspecting cluster state

• available for Linux, OpenSolaris, Mac OSX

Page 9: CHUG: Datacenter Computing with Apache Mesos

Mesos – architecture

given the use of Mesos as a Datacenter OS kernel…

• Chronos provides complex scheduling capabilities,much like a distributed Unix “cron”

• Marathon provides highly-available long-running services, much like a distributed Unix “init.d”

• next time you need to build a distributed app, consider using these as building blocks

a major lesson learned from Spark:

• leveraging these kinds of building blocks, one can rebuild Hadoop 100x faster, in much less code

Page 10: CHUG: Datacenter Computing with Apache Mesos

Kernel

Apps

servicesbatch

Frameworks

Python

JVM

C++

Workloads

distributed file system

Chronos

DFS

distributed resources: CPU, RAM, I/O, FS, rack locality, etc. Cluster

Storm

Kafka JBoss Django RailsSharkImpalaScalding

Marathon

SparkHadoopMPI

MySQL

Mesos – architecture

Page 11: CHUG: Datacenter Computing with Apache Mesos

Mesos – datacenter OS stack

HADOOP STORM CHRONOS RAILS JBOSS

TELEMETRY

Kernel

OS

Apps

MESOS

CAPACITY PLANNING GUISECURITYSMARTER SCHEDULING

Page 12: CHUG: Datacenter Computing with Apache Mesos

Prior Practice: Dedicated Servers

• low utilization rates

• longer time to ramp up new services

DATACENTER

Page 13: CHUG: Datacenter Computing with Apache Mesos

Prior Practice: Virtualization

DATACENTER PROVISIONED VMS

• even more machines to manage

• substantial performance decrease due to virtualization

• VM licensing costs

Page 14: CHUG: Datacenter Computing with Apache Mesos

Prior Practice: Static Partitioning

STATIC PARTITIONING

• even more machines to manage

• substantial performance decrease due to virtualization

• VM licensing costs

• static partitioning limits elasticity

DATACENTER

Page 15: CHUG: Datacenter Computing with Apache Mesos

MESOS

Mesos: One Large Pool Of Resources

“We wanted people to be able to program for the datacenter just like they program for their laptop."

Ben Hindman

DATACENTER

Page 16: CHUG: Datacenter Computing with Apache Mesos

Arguments for Datacenter Computing

rather than running several specialized clusters, each at relatively low utilization rates, instead run many mixed workloads

obvious benefits are realized in terms of:

• scalability, elasticity, fault tolerance, performance, utilization

• reduced equipment cap­ex, Ops overhead, etc.

• reduced licensing, eliminating need for VMs or potential vendor lock­in

subtle benefits – arguably, more important for Enterprise IT:

• reduced time for engineers to ramp­up new services at scale

• reduced latency between batch and services, enabling new high­ROI use cases

• enables Dev/Test apps to run safely on a Production cluster

Page 18: CHUG: Datacenter Computing with Apache Mesos

What are the costs of Single Tenancy?

0%

25%

50%

75%

100%

RAILS CPU LOAD

MEMCACHED CPU LOAD

0%

25%

50%

75%

100%

HADOOP CPU LOAD

0%

25%

50%

75%

100%

t t

0%

25%

50%

75%

100%

Rails MemcachedHadoop

COMBINED CPU LOAD (RAILS, MEMCACHED, HADOOP)

Page 19: CHUG: Datacenter Computing with Apache Mesos

Example: Resource Offer in a Two-Level Scheduler

mesos.apache.org/documentation/latest/mesos-architecture/

Page 20: CHUG: Datacenter Computing with Apache Mesos

M

MasterDockerRegistry

index.docker.io

LocalDockerRegistry

( optional )

M

M

S

S

S

S

S

S

marathon

docker

docker

docker

Mesosmaster servers

Mesosslave servers

Marathon can launch and monitor service containers from one or more Docker registries, using the Docker executor for Mesos

S

S

S S

S

S

… … …

Example: Docker on Mesos

mesosphere.io/2013/09/26/docker-on-mesos/

Page 21: CHUG: Datacenter Computing with Apache Mesos

Mesos Master Server

init | + mesos-master | + marathon |

Mesos Slave Server

init | + docker | | | + lxc | | | + (user task, under container init system) | | | + mesos-slave | | | + /var/lib/mesos/executors/docker | | | | | + docker run … | | |

The executor, monitored by the Mesos slave, delegates to the local Docker daemon for image discovery and management. The executor communicates with Marathon via the Mesos master and ensures that Docker enforces the specified resource limitations.

Example: Docker on Mesos

mesosphere.io/2013/09/26/docker-on-mesos/

Page 22: CHUG: Datacenter Computing with Apache Mesos

Mesos Master Server

init | + mesos-master | + marathon |

Mesos Slave Server

init | + docker | | | + lxc | | | + (user task, under container init system) | | | + mesos-slave | | | + /var/lib/mesos/executors/docker | | | | | + docker run … | | |

DockerRegistry

When a user requests a container…

Mesos, LXC, and Docker are tied together for launch

21

3

4

5

6

7

8

Example: Docker on Mesos

mesosphere.io/2013/09/26/docker-on-mesos/

Page 23: CHUG: Datacenter Computing with Apache Mesos

Production Deployments (public)

Page 24: CHUG: Datacenter Computing with Apache Mesos

Built-in /bare metal

Hypervisors

Solaris Zones

Linux CGroups

Opposite Ends of the Spectrum, One Common Substrate

Page 25: CHUG: Datacenter Computing with Apache Mesos

Opposite Ends of the Spectrum, One Common Substrate

Request /Response Batch

Page 26: CHUG: Datacenter Computing with Apache Mesos

Case Study: Twitter (bare metal / on premise)

“Mesos is the cornerstone of our elastic compute infrastructure – it’s how we build all our new services and is critical for Twitter’s continued success at scale. It's one of the primary keys to our data center efficiency."

Chris Fry, SVP Engineeringblog.twitter.com/2013/mesos-graduates-from-apache-incubation

• key services run in production: analytics, typeahead, ads

• Twitter engineers rely on Mesos to build all new services

• instead of thinking about static machines, engineers think about resources like CPU, memory and disk

• allows services to scale and leverage a shared pool of servers across datacenters efficiently

• reduces the time between prototyping and launching

Page 27: CHUG: Datacenter Computing with Apache Mesos

Case Study: Airbnb (fungible cloud infrastructure)

“We think we might be pushing data science in the field of travel more so than anyone has ever done before… a smaller number of engineers can have higher impact through automation on Mesos."

Mike Curtis, VP Engineeringgigaom.com/2013/07/29/airbnb-is-engineering-itself-into-a-data...

• improves resource management and efficiency

• helps advance engineering strategy of building small teams that can move fast

• key to letting engineers make the most of AWS-based infrastructure beyond just Hadoop

• allowed company to migrate off Elastic MapReduce

• enables use of Hadoop along with Chronos, Spark, Storm, etc.

Page 28: CHUG: Datacenter Computing with Apache Mesos

Media Coverage

Mesosphere Adds Docker Support To Its Mesos-Based Operating System For The Data CenterFrederic LardinoisTechCrunch (2013-09-26)techcrunch.com/2013/09/26/mesosphere...

Play Framework Grid Deployment with MesosJames Ward, Flo Leibert, et al.Typesafe blog (2013-09-19)typesafe.com/blog/play-framework-grid...

Mesosphere Launches Marathon FrameworkAdrian BridgwaterDr. Dobbs (2013-09-18)drdobbs.com/open-source/mesosphere...

New open source tech Marathon wants to make your data center run like Google’sDerrick HarrisGigaOM (2013-09-04)gigaom.com/2013/09/04/new-open-source...

Running batch and long-running, highly available service jobs on the same clusterBen LoricaO’Reilly (2013-09-01)strata.oreilly.com/2013/09/running-batch...

Page 30: CHUG: Datacenter Computing with Apache Mesos

Join us!Mesos Unconference @Twitter HQ, SFNov 19eventbrite.com/event/9104464699

Data Day Texas, AustinJan 112014.datadaytexas.com(incl. Mesos talk+BOF)

O’Reilly Strata, Santa ClaraFeb 11-13strataconf.com/strata2014(incl. Mesos talk+BOF+workshop)