Containerization as the Building Block for Datacenter - - PowerPoint PPT Presentation

containerization as the building block for datacenter
SMART_READER_LITE
LIVE PREVIEW

Containerization as the Building Block for Datacenter - - PowerPoint PPT Presentation

Containerization as the Building Block for Datacenter Applications GOTO Amsterdam June 19, 2015 Benjamin Hindman @benh an emerging trend


slide-1
SLIDE 1

Benjamin ¡Hindman ¡ ¡– ¡@benh ¡

Containerization ¡as ¡ the ¡Building ¡Block ¡ for ¡Datacenter ¡ Applications ¡

GOTO ¡Amsterdam ¡ June ¡19, ¡2015 ¡

slide-2
SLIDE 2

an ¡emerging ¡trend ¡

microservices ¡ containerization ¡

slide-3
SLIDE 3

(micro)services ¡

① do ¡one ¡thing ¡and ¡do ¡it ¡well ¡(UNIX) ¡ ② compose! ¡ ③ build/commit ¡in ¡isolation, ¡test ¡in ¡isolation, ¡ deploy ¡in ¡isolation ¡(with ¡easy ¡rollback) ¡ ④ captures ¡organizational ¡structure ¡(many ¡ teams ¡working ¡in ¡parallel) ¡

slide-4
SLIDE 4
slide-5
SLIDE 5
slide-6
SLIDE 6

containerization ¡

now ¡ then ¡

slide-7
SLIDE 7

containerization ¡

now ¡ then ¡ more ¡moving ¡parts ¡ less ¡moving ¡parts ¡

slide-8
SLIDE 8

a ¡reinforcing ¡trend ¡

microservices ¡ containerization ¡ cluster ¡management ¡

slide-9
SLIDE 9

“cluster ¡management” ¡ at ¡Twitter, ¡circa ¡2010 ¡

(configuration/package ¡management) ¡ (deployment) ¡

slide-10
SLIDE 10

“cluster ¡management” ¡ at ¡Twitter, ¡circa ¡2010 ¡

(configuration/package ¡management) ¡ (deployment) ¡

slide-11
SLIDE 11

“cluster ¡management” ¡ at ¡Twitter, ¡circa ¡2010 ¡

(configuration/package ¡management) ¡ (deployment) ¡

slide-12
SLIDE 12
slide-13
SLIDE 13

MySQL ¡

slide-14
SLIDE 14

MySQL ¡ memcached ¡

slide-15
SLIDE 15

MySQL ¡ Rails ¡ memcached ¡

slide-16
SLIDE 16

MySQL ¡ Cassandra ¡ Rails ¡ memcached ¡

slide-17
SLIDE 17

MySQL ¡ Cassandra ¡ Rails ¡ Hadoop ¡ memcached ¡

slide-18
SLIDE 18

challenges

slide-19
SLIDE 19

challenges

① failures ¡

slide-20
SLIDE 20

failures ¡

slide-21
SLIDE 21

MySQL ¡ Cassandra ¡ Rails ¡ Hadoop ¡ memcached ¡

slide-22
SLIDE 22

MySQL ¡ Cassandra ¡ Rails ¡ Hadoop ¡ memcached ¡

slide-23
SLIDE 23

challenges

② ¡maintenance ¡ (aka ¡“planned ¡failures”) ¡ ¡

slide-24
SLIDE 24

maintenance ¡

① upgrading ¡software ¡(i.e., ¡the ¡kernel) ¡

  • ps ¡

developers ¡

slide-25
SLIDE 25

maintenance ¡

① upgrading ¡software ¡(i.e., ¡the ¡kernel) ¡ ② replacing ¡machines, ¡switches, ¡PDUs, ¡etc ¡

slide-26
SLIDE 26

MySQL ¡ Cassandra ¡ Rails ¡ Hadoop ¡ memcached ¡

slide-27
SLIDE 27

MySQL ¡ Cassandra ¡ Rails ¡ Hadoop ¡ memcached ¡

slide-28
SLIDE 28

challenges

③ ¡utilization ¡

slide-29
SLIDE 29

Rails ¡ Hadoop ¡ memcached ¡

utilization ¡

slide-30
SLIDE 30

utilization ¡

Rails ¡ Hadoop ¡ memcached ¡

slide-31
SLIDE 31

utilization ¡

Rails ¡ Hadoop ¡ memcached ¡ buy ¡less ¡machines ¡

  • r ¡

run ¡more ¡applications! ¡

slide-32
SLIDE 32

challenges

① failures ¡ ② maintenance ¡ ③ utilization ¡

slide-33
SLIDE 33

challenges

① failures ¡ ② maintenance ¡ ③ utilization ¡

planning ¡for ¡ failure? ¡

slide-34
SLIDE 34

planning ¡for ¡failure ¡

slide-35
SLIDE 35

challenges

① failures ¡ ② maintenance ¡ ③ utilization ¡

planning ¡for ¡ utilization? ¡

slide-36
SLIDE 36

planning ¡for ¡utilization ¡

intra-­‑machine ¡resource ¡sharing: ¡ share ¡a ¡single ¡machine’s ¡resources ¡between ¡ multiple ¡applications ¡(multi-­‑tenancy) ¡ intra-­‑datacenter ¡resource ¡sharing: ¡ share ¡multiple ¡machine’s ¡resources ¡between ¡ multiple ¡applications ¡

slide-37
SLIDE 37

Twitter, ¡circa ¡2010 ¡

I ¡want ¡a ¡cluster ¡ manager! ¡

slide-38
SLIDE 38

cluster ¡management ¡

① Treat ¡machines ¡as ¡cattle ¡not ¡pets. ¡

» Keep ¡the ¡base ¡operating ¡system ¡small ¡and ¡simple, ¡ run ¡“containerized” ¡applications. ¡

slide-39
SLIDE 39

cluster ¡management ¡

① Treat ¡machines ¡as ¡cattle ¡not ¡pets. ¡

» Keep ¡the ¡base ¡operating ¡system ¡small ¡and ¡simple, ¡ run ¡“containerized” ¡applications. ¡

② Automate ¡with ¡software ¡not ¡humans. ¡

» Let ¡software ¡schedule ¡software, ¡i.e., ¡handle ¡ failures, ¡improve ¡utilization, ¡and ¡manage ¡

  • maintenance. ¡
slide-40
SLIDE 40

cluster ¡management ¡

industry ¡ academia ¡

slide-41
SLIDE 41

different ¡software ¡

academia ¡ industry ¡

  • ¡MPI ¡(Message ¡Passing ¡Interface) ¡
  • ¡Apache ¡(mod_perl, ¡mod_php) ¡
  • ¡web ¡services ¡(Java, ¡Ruby, ¡…) ¡
slide-42
SLIDE 42

different ¡scale ¡(at ¡first) ¡

academia ¡ industry ¡

  • ¡100’s ¡of ¡machines ¡
  • ¡10’s ¡of ¡machines ¡
slide-43
SLIDE 43

cluster ¡management ¡

academia ¡ industry ¡

  • ¡PBS ¡(Portable ¡Batch ¡System) ¡
  • ¡TORQUE ¡
  • ¡SGE ¡(Sun ¡Grid ¡Engine) ¡
  • ¡ssh ¡
  • ¡Puppet/Chef ¡
  • ¡Capistrano/Ansible ¡

cluster ¡managers ¡

slide-44
SLIDE 44

different ¡scale ¡(converging) ¡

academia ¡ industry ¡

  • ¡100’s ¡of ¡machines ¡
  • ¡10’s ¡of ¡machines ¡

1,000’s ¡of ¡machines ¡

slide-45
SLIDE 45

cluster ¡management ¡

academia ¡ industry ¡

  • ¡PBS ¡(Portable ¡Batch ¡System) ¡
  • ¡TORQUE ¡
  • ¡SGE ¡(Sun ¡Grid ¡Engine) ¡
  • ¡ssh ¡
  • ¡Puppet/Chef ¡
  • ¡Capistrano/Ansible ¡

batch ¡computation! ¡

slide-46
SLIDE 46

Apache ¡Mesos ¡is ¡a ¡modern ¡ general ¡purpose ¡cluster ¡manager ¡ (i.e., ¡not ¡just ¡focused ¡on ¡ batch ¡computing) ¡

slide-47
SLIDE 47

Mesos ¡was ¡designed ¡to ¡run: ¡

slide-48
SLIDE 48
slide-49
SLIDE 49
slide-50
SLIDE 50

stateless ¡services! ¡

slide-51
SLIDE 51

Mesos ¡is ¡a ¡cluster ¡manager ¡with ¡a ¡ master/slave ¡architecture ¡

masters ¡ slaves ¡

slide-52
SLIDE 52

schedulers ¡register ¡with ¡the ¡ Mesos ¡master(s) ¡in ¡order ¡to ¡run ¡ jobs/tasks ¡

masters ¡ slaves ¡ schedulers ¡

slide-53
SLIDE 53

stateless ¡services! ¡

slide-54
SLIDE 54

service ¡scheduler ¡

service ¡scheduler ¡ Mesos ¡

  • rchestrates ¡services ¡

using ¡Mesos ¡

slide-55
SLIDE 55
  • rchestration ¡vs ¡scheduling ¡

service ¡scheduler ¡ Mesos ¡

schedule ¡

slide-56
SLIDE 56
  • rchestration ¡vs ¡scheduling ¡

service ¡scheduler ¡ Mesos ¡

  • rchestrate ¡

schedule ¡

slide-57
SLIDE 57
  • rchestration ¡w/ ¡Mesosphere’s ¡Marathon ¡

¡

① configuration/package ¡ management ¡ ② deployment ¡

slide-58
SLIDE 58

configuration/package ¡management ¡

(1) bundle ¡services ¡as ¡jar, ¡tar/gzip, ¡ ¡

  • r ¡using ¡Docker ¡

(2) ¡upload ¡to ¡HDFS, ¡S3, ¡ ¡ Docker ¡registry, ¡etc ¡

slide-59
SLIDE 59

deployment ¡

(1) ¡describe ¡services ¡ using ¡JSON ¡ (2) ¡submit ¡services ¡to ¡ Marathon ¡via ¡REST ¡or ¡CLI ¡

slide-60
SLIDE 60

example-­‑docker.json ¡

{ "container": { "type": "DOCKER", "docker": { "image": "libmesos/ubuntu" }, "volumes" : [ { "containerPath": "/etc/a", "hostPath": "/var/data/a", "mode": "RO" }, { "containerPath": "/etc/b", "hostPath": "/var/data/b", "mode": "RW" } ] }, "id": "ubuntu", "instances": 1, "cpus": 0.5, "mem": 512, "cmd": "while sleep 10; do date -u +%T; done" }

slide-61
SLIDE 61
  • rchestration ¡w/ ¡Kubernetes ¡on ¡Mesos ¡

¡

① configuration/package ¡ management ¡ ② deployment ¡

slide-62
SLIDE 62

multiple ¡schedulers ¡

slide-63
SLIDE 63

multiple ¡schedulers ¡

… ¡

slide-64
SLIDE 64

multiple ¡schedulers ¡

slide-65
SLIDE 65

multiple ¡schedulers ¡

0.8.2 0.9.0

slide-66
SLIDE 66

multiple ¡schedulers ¡

slide-67
SLIDE 67

going ¡deeper ¡… ¡

slide-68
SLIDE 68

multiple ¡schedulers ¡

slide-69
SLIDE 69

two-­‑level ¡scheduling ¡

Mesos ¡influenced ¡by ¡multi-­‑level ¡scheduling ¡in ¡ traditional ¡operating ¡systems ¡(user-­‑space ¡ scheduling ¡and ¡scheduler ¡activations) ¡ ¡ Mesos ¡is ¡designed ¡less ¡like ¡a ¡“cluster ¡manager” ¡ and ¡more ¡like ¡an ¡operating ¡system ¡kernel ¡

slide-70
SLIDE 70

Apache ¡Mesos: ¡ distributed ¡systems ¡kernel ¡

slide-71
SLIDE 71

Apache ¡Mesos: ¡ datacenter ¡kernel ¡

slide-72
SLIDE 72

Mesos ¡(nodes) ¡

Mesos: ¡datacenter ¡kernel ¡

scheduler ¡ Mesos ¡(master) ¡ scheduler ¡ syscall-­‑like ¡API ¡ for ¡datacenter ¡

slide-73
SLIDE 73

Mesos: ¡datacenter ¡kernel ¡

+ ¡enable ¡running ¡multiple ¡distributed ¡systems ¡

  • n ¡the ¡same ¡cluster ¡of ¡machines ¡and ¡

dynamically ¡share ¡the ¡resources ¡more ¡ efficiently! ¡

slide-74
SLIDE 74

Mesos: ¡datacenter ¡kernel ¡

+ ¡enable ¡building ¡new ¡distributed ¡systems ¡by ¡ providing ¡common ¡functionality ¡(primitives) ¡ every ¡new ¡distributed ¡system ¡re-­‑implements ¡

slide-75
SLIDE 75

Mesos ¡primitives ¡

  • principals, ¡users, ¡roles ¡
  • advanced ¡fair-­‑sharing ¡

allocation ¡algorithms ¡

  • high-­‑availability ¡(even ¡

during ¡upgrades) ¡

  • resource ¡monitoring ¡
  • preemption/revocation ¡
  • volume ¡management ¡
  • reservations ¡(dynamic/

static) ¡

  • … ¡
slide-76
SLIDE 76

build ¡on ¡top ¡of ¡Mesos ¡

① don’t ¡reinvent ¡the ¡wheel: ¡leverage ¡primitives ¡ to ¡implement/automate ¡failures, ¡ maintenance, ¡etc. ¡

slide-77
SLIDE 77

build ¡on ¡top ¡of ¡Mesos ¡

② make ¡it ¡easier ¡for ¡your ¡users ¡to ¡use ¡your ¡ software! ¡

slide-78
SLIDE 78

build ¡on ¡top ¡of ¡Mesos ¡

② make ¡it ¡easier ¡for ¡your ¡users ¡to ¡use ¡your ¡ software! ¡

slide-79
SLIDE 79

built ¡on ¡Mesos ¡

2009 ¡ 2010 ¡ 2013 ¡ 2014 ¡

slide-80
SLIDE 80

ported ¡to ¡Mesos ¡

2011 ¡ 2012 ¡ 2013 ¡ 2014 ¡

slide-81
SLIDE 81

Mesos ¡is ¡being ¡run ¡at: ¡

2010 ¡ 2013 ¡ 2014 ¡ … ¡

slide-82
SLIDE 82

going ¡even ¡deeper ¡… ¡

slide-83
SLIDE 83

Mesos ¡resource ¡requests/offers ¡

masters ¡ scheduler ¡

request ¡ 3 ¡CPUs ¡ 2 ¡GB ¡RAM ¡

a ¡request ¡is ¡purposely ¡simplified ¡ subset ¡of ¡a ¡specification, ¡mainly ¡ including ¡the ¡required ¡resources ¡ at ¡that ¡point ¡in ¡time ¡

slide-84
SLIDE 84

Mesos ¡resource ¡requests/offers ¡

masters ¡ scheduler ¡

  • ffer ¡

hostname ¡ 4 ¡CPUs ¡ 4 ¡GB ¡RAM ¡

slide-85
SLIDE 85
  • ffer ¡

hostname ¡ 4 ¡CPUs ¡ 4 ¡GB ¡RAM ¡

  • ffer ¡

hostname ¡ 4 ¡CPUs ¡ 4 ¡GB ¡RAM ¡

  • ffer ¡

hostname ¡ 4 ¡CPUs ¡ 4 ¡GB ¡RAM ¡

Mesos ¡resource ¡requests/offers ¡

masters ¡ scheduler ¡

  • ffer ¡

hostname ¡ 4 ¡CPUs ¡ 4 ¡GB ¡RAM ¡

slide-86
SLIDE 86
  • ffer ¡

hostname ¡ 4 ¡CPUs ¡ 4 ¡GB ¡RAM ¡

  • ffer ¡

hostname ¡ 4 ¡CPUs ¡ 4 ¡GB ¡RAM ¡

  • ffer ¡

hostname ¡ 4 ¡CPUs ¡ 4 ¡GB ¡RAM ¡

Mesos ¡resource ¡requests/offers ¡

masters ¡ scheduler ¡

  • ffer ¡

hostname ¡ 4 ¡CPUs ¡ 4 ¡GB ¡RAM ¡

scheduler ¡uses ¡the ¡offers ¡to ¡ decide ¡what ¡tasks ¡to ¡run ¡

slide-87
SLIDE 87
  • ffer ¡

hostname ¡ 4 ¡CPUs ¡ 4 ¡GB ¡RAM ¡

  • ffer ¡

hostname ¡ 4 ¡CPUs ¡ 4 ¡GB ¡RAM ¡

  • ffer ¡

hostname ¡ 4 ¡CPUs ¡ 4 ¡GB ¡RAM ¡

Mesos ¡resource ¡requests/offers ¡

masters ¡ scheduler ¡

  • ffer ¡

hostname ¡ 4 ¡CPUs ¡ 4 ¡GB ¡RAM ¡

scheduler ¡uses ¡the ¡offers ¡to ¡ decide ¡what ¡tasks ¡to ¡run ¡ ¡ “two-­‑level ¡scheduling” ¡

slide-88
SLIDE 88

Mesos ¡task/executor ¡model ¡

masters ¡ scheduler ¡

scheduler ¡uses ¡the ¡offers ¡to ¡ decide ¡what ¡tasks ¡to ¡run ¡

task ¡ 3 ¡CPUs ¡ 2 ¡GB ¡RAM ¡

slide-89
SLIDE 89

slave ¡

a ¡task ¡with ¡a ¡command ¡

mesos-slave

slide-90
SLIDE 90

slave ¡

a ¡task ¡with ¡a ¡command ¡

mesos-slave task

slide-91
SLIDE 91

slave ¡

a ¡task ¡with ¡a ¡command ¡

mesos-slave task task

slide-92
SLIDE 92

slave ¡

a ¡task ¡with ¡an ¡executor ¡

mesos-slave

slide-93
SLIDE 93

slave ¡

a ¡task ¡with ¡an ¡executor ¡

mesos-slave executor

slide-94
SLIDE 94

slave ¡

a ¡task ¡with ¡an ¡executor ¡

mesos-slave executor task

slide-95
SLIDE 95

slave ¡

a ¡task ¡with ¡an ¡executor ¡

mesos-slave executor task task

slide-96
SLIDE 96

slave ¡

a ¡task ¡with ¡an ¡executor ¡

mesos-slave executor

slide-97
SLIDE 97

slave ¡

a ¡task ¡with ¡an ¡executor ¡

mesos-slave executor task task task

slide-98
SLIDE 98

slave ¡

task/executor ¡isolation ¡

mesos-slave executor task task

slide-99
SLIDE 99

slave ¡

task/executor ¡isolation ¡

mesos-slave executor task task

containers ¡

slide-100
SLIDE 100

slave ¡

task/executor ¡isolation ¡

mesos-slave executor task task

slide-101
SLIDE 101

slave ¡

task/executor ¡isolation ¡

mesos-slave executor task task

slide-102
SLIDE 102

slave ¡

task/executor ¡isolation ¡

mesos-slave executor task task

slide-103
SLIDE 103

slave ¡

task/executor ¡isolation ¡

mesos-slave executor task task

slide-104
SLIDE 104

slave ¡

task/executor ¡isolation ¡

mesos-slave executor task task

slide-105
SLIDE 105

slave ¡

task/executor ¡isolation ¡

mesos-slave executor task task

slide-106
SLIDE 106

slave ¡

task/executor ¡isolation ¡

mesos-slave executor task task

slide-107
SLIDE 107

slave ¡

a ¡task ¡with ¡a ¡Docker ¡image ¡

mesos-slave Docker image

slide-108
SLIDE 108

masters ¡

master ¡failover ¡

scheduler ¡

after ¡a ¡new ¡master ¡is ¡elected ¡all ¡ schedulers ¡and ¡slaves ¡connect ¡to ¡ the ¡new ¡master ¡ ¡ all ¡tasks ¡keep ¡running ¡across ¡master ¡ failover! ¡

slide-109
SLIDE 109

masters ¡

scheduler ¡failover ¡

scheduler ¡

scheduler ¡re-­‑registers ¡with ¡master ¡ and ¡resumes ¡operation ¡ ¡ all ¡tasks ¡keep ¡running ¡across ¡ framework ¡failover! ¡

scheduler ¡

slide-110
SLIDE 110

slave ¡

slave ¡failover ¡

mesos-slave task task

slide-111
SLIDE 111

slave ¡

slave ¡failover ¡

mesos-slave task task

slide-112
SLIDE 112

slave ¡

slave ¡failover ¡

task task

slide-113
SLIDE 113

slave ¡

slave ¡failover ¡

mesos-slave task task

slide-114
SLIDE 114

slave ¡

slave ¡failover ¡

mesos-slave task task

slide-115
SLIDE 115

slave ¡

slave ¡failover ¡

mesos-slave (large ¡in-­‑memory ¡services, ¡ expensive ¡to ¡restart) ¡

slide-116
SLIDE 116

down ¡the ¡rabbit ¡hole ¡… ¡

slide-117
SLIDE 117

Mesos ¡1st-­‑level ¡scheduler ¡allocates ¡ resources ¡to ¡frameworks ¡using ¡a ¡ fair-­‑sharing ¡algorithm ¡ we ¡created ¡called ¡Dominant ¡ Resource ¡Fairness ¡(DRF) ¡

slide-118
SLIDE 118

DRF, ¡born ¡of ¡static ¡partitioning ¡

datacenter ¡

slide-119
SLIDE 119

static ¡partitioning ¡across ¡teams ¡

promotions ¡ trends ¡ recommendations ¡ team ¡

slide-120
SLIDE 120

promotions ¡ trends ¡ recommendations ¡ team ¡ fairly ¡shared! ¡

static ¡partitioning ¡across ¡teams ¡

slide-121
SLIDE 121

goal: ¡fairly ¡share ¡the ¡resources ¡ without ¡static ¡partitioning ¡

slide-122
SLIDE 122

partition ¡utilizations ¡

promotions ¡ trends ¡ recommendations ¡ 45% ¡CPU ¡ 100% ¡RAM ¡ 75% ¡CPU ¡ 100% ¡RAM ¡ 100% ¡CPU ¡ 50% ¡RAM ¡ team ¡ utilization ¡

slide-123
SLIDE 123
  • bservation: ¡a ¡dominant ¡resource ¡

bottlenecks ¡each ¡team ¡from ¡ running ¡any ¡more ¡jobs/tasks ¡

¡

slide-124
SLIDE 124

dominant ¡resource ¡bottlenecks ¡

promotions ¡ trends ¡ recommendations ¡ team ¡ utilization ¡ bottleneck ¡ RAM ¡ 45% ¡CPU ¡ 100% ¡RAM ¡ 75% ¡CPU ¡ 100% ¡RAM ¡ 100% ¡CPU ¡ 50% ¡RAM ¡ RAM ¡ CPU ¡

slide-125
SLIDE 125

insight: ¡allocating ¡a ¡fair ¡share ¡of ¡

each ¡team’s ¡dominant ¡resource ¡ guarantees ¡they ¡can ¡run ¡at ¡least ¡ as ¡many ¡jobs/tasks ¡as ¡with ¡static ¡ partitioning! ¡

slide-126
SLIDE 126

… ¡if ¡my ¡team ¡gets ¡at ¡least ¡1/N ¡of ¡

my ¡dominant ¡resource ¡I ¡will ¡do ¡ no ¡worse ¡than ¡if ¡I ¡had ¡my ¡own ¡ cluster, ¡but ¡I ¡might ¡do ¡better ¡ when ¡resources ¡are ¡available! ¡

slide-127
SLIDE 127

¡ ¡ ¡tep ¡4: ¡Profit ¡ (statistical ¡multiplexing) ¡

$ ¡

slide-128
SLIDE 128

in ¡practice, ¡ fair ¡sharing ¡is ¡insufficient ¡

slide-129
SLIDE 129

weighted ¡fair ¡sharing ¡

promotions ¡ trends ¡ recommendations ¡ team ¡

slide-130
SLIDE 130

weighted ¡fair ¡sharing ¡

promotions ¡ trends ¡ recommendations ¡ team ¡ weight ¡ 0.17 ¡ 0.5 ¡ 0.33 ¡

slide-131
SLIDE 131

Mesos ¡implements ¡weighted ¡DRF ¡

masters ¡

masters ¡can ¡be ¡configured ¡with ¡ weights ¡per ¡role ¡ ¡ resource ¡allocation ¡decisions ¡ incorporate ¡the ¡weights ¡to ¡ determine ¡dominant ¡fair ¡shares ¡

slide-132
SLIDE 132

in ¡practice, ¡ weighted ¡fair ¡sharing ¡ is ¡still ¡insufficient ¡

slide-133
SLIDE 133

a ¡non-­‑cooperative ¡framework ¡ (i.e., ¡has ¡long ¡tasks ¡or ¡is ¡buggy) ¡ can ¡get ¡hoard ¡too ¡many ¡resources ¡

slide-134
SLIDE 134

resource ¡reservations ¡

resources ¡on ¡individual ¡slaves ¡ can ¡be ¡reserved ¡for ¡particular ¡ roles ¡ ¡ resource ¡offers ¡include ¡the ¡ reservation ¡role ¡(if ¡any) ¡

masters ¡ framework ¡(trends) ¡

  • ffer ¡

hostname ¡ 4 ¡CPUs ¡ 4 ¡GB ¡RAM ¡ role: ¡trends ¡

slide-135
SLIDE 135

reservations ¡

slave ¡

*

role-foo

reservations ¡

mesos-slave

role-bar

slide-136
SLIDE 136

static ¡reservations ¡

reservations ¡available ¡with ¡Mesos ¡using ¡the ¡ ¡ ¡ ¡ ¡

  • -resources ¡flag ¡on ¡each ¡mesos-slave

¡

$ mesos-slave --resources=‘cpus(role-foo): 2;mem(role-foo):1024;cpus(role-bar): 2;mem(role-bar):1024;cpus(*):4;mem(*):4096’

slide-137
SLIDE 137

static ¡reservations ¡

+ ¡strong ¡guarantees ¡

  • ­‑ ¡set ¡up ¡by ¡an ¡operator ¡when ¡starting ¡slave ¡
  • ­‑ ¡immutable ¡(must ¡drain/restart ¡the ¡slave) ¡

¡ ¡

slide-138
SLIDE 138

dynamic ¡reservations ¡

framework ¡scheduler ¡reserves ¡resources ¡at ¡runtime ¡ when ¡it ¡accepts ¡an ¡offer ¡(allocation) ¡ ¡ ¡ ¡

masters ¡

  • ffer ¡

hostname ¡ 4 ¡CPUs ¡ 4 ¡GB ¡RAM ¡

slave ¡ (1) ¡ framework ¡ (role-­‑baz) ¡

slide-139
SLIDE 139

dynamic ¡reservations ¡

framework ¡scheduler ¡reserves ¡resources ¡at ¡runtime ¡ when ¡it ¡accepts ¡an ¡offer ¡(allocation) ¡ ¡ ¡ ¡

masters ¡ framework ¡ (role-­‑baz) ¡

Accept ¡ Launch/ Reserve(4 ¡ CPUs, ¡4 ¡ GB ¡RAM) ¡

slave ¡ (2) ¡

slide-140
SLIDE 140

dynamic ¡reservations ¡

framework ¡scheduler ¡reserves ¡resources ¡at ¡runtime ¡ when ¡it ¡accepts ¡an ¡offer ¡(allocation) ¡ ¡ ¡ ¡

masters ¡

Launch/ Reserve(4 ¡ CPUs, ¡4 ¡ GB ¡RAM) ¡

slave ¡ (3) ¡ framework ¡ (role-­‑baz) ¡

slide-141
SLIDE 141

promotions ¡ 40% ¡ trends ¡ 20% ¡ used ¡ 10% ¡ unused ¡ 30% ¡ recommendations ¡ 40% ¡

reservations ¡

reservations ¡provide ¡guarantees, ¡ but ¡at ¡the ¡cost ¡of ¡utilization ¡

slide-142
SLIDE 142

revocable ¡resources ¡

masters ¡ framework ¡(promotions) ¡

resources ¡that ¡are ¡reserved ¡for ¡ another ¡role ¡and ¡thus ¡may ¡be ¡ revoked ¡at ¡any ¡time ¡

  • ffer ¡

hostname ¡ 4 ¡CPUs ¡ 4 ¡GB ¡RAM ¡ role: ¡trends ¡

slide-143
SLIDE 143

preemption ¡via ¡revocation ¡

¡

… ¡my ¡tasks ¡will ¡not ¡be ¡killed ¡ unless ¡I’m ¡using ¡revocable ¡ resources! ¡

slide-144
SLIDE 144
  • versubscription ¡via ¡

revocable ¡resources ¡

masters ¡ framework ¡(promotions) ¡

  • versubscribe ¡resources ¡by ¡

allocating ¡unused ¡resources ¡as ¡ revocable! ¡

  • ffer ¡

hostname ¡ 4 ¡CPUs ¡ 4 ¡GB ¡RAM ¡ role: ¡trends ¡

slide-145
SLIDE 145

revocation ¡“guarantee” ¡

… ¡my ¡tasks ¡will ¡not ¡be ¡killed ¡ unless ¡I’m ¡using ¡revocable ¡ resources! ¡

slide-146
SLIDE 146

revocation ¡“guarantee” ¡

what ¡about ¡when: ¡ ① want/need ¡to ¡defrag ¡(think ¡page ¡ replacement ¡algorithm!) ¡ ② maintenance ¡

slide-147
SLIDE 147

mechanism ¡for ¡deallocation ¡

possible ¡solution: ¡introduce ¡failures ¡to ¡ deallocate ¡resources ¡ ¡ but ¡why ¡not ¡communicate ¡explicitly!? ¡

slide-148
SLIDE 148

inverse ¡offer ¡

framework ¡scheduler ¡gets ¡deallocation ¡requests ¡in ¡ the ¡form ¡of ¡inverse ¡offers ¡ ¡ ¡ ¡

masters ¡

  • ffer-­‑1 ¡

hostname ¡ 4 ¡CPUs ¡ 4 ¡GB ¡RAM ¡

slave ¡ (1) ¡ framework ¡ (role-­‑baz) ¡

slide-149
SLIDE 149

inverse ¡offer ¡

framework ¡scheduler ¡can ¡kill ¡tasks ¡and ¡ acknowledge ¡deallocation ¡ ¡ ¡ ¡

masters ¡ framework ¡ (role-­‑baz) ¡

Kill/ACK ¡

slave ¡ (2) ¡

slide-150
SLIDE 150

maintenance ¡

① drain ¡machine ¡by ¡sending ¡out ¡inverse ¡offers ¡ ② while ¡draining ¡can ¡still ¡send ¡out ¡offers ¡with ¡ revocable ¡resources ¡ ③ remove ¡machine ¡from ¡allocation ¡once ¡ drained ¡(or ¡at ¡some ¡specific ¡time) ¡

slide-151
SLIDE 151

but ¡what ¡about ¡my ¡ persistent ¡data? ¡

slide-152
SLIDE 152

persistent ¡volumes ¡

framework ¡scheduler ¡creates ¡volumes ¡for ¡disk ¡ resources ¡at ¡runtime ¡when ¡it ¡accepts ¡an ¡offer ¡ (allocation) ¡ ¡ ¡ ¡

masters ¡

Offer ¡ hostname ¡ 4 ¡CPUs ¡ 4 ¡GB ¡RAM ¡

slave ¡ (1) ¡ scheduler ¡ (role-­‑baz) ¡

slide-153
SLIDE 153

persistent ¡volumes ¡

framework ¡scheduler ¡creates ¡volumes ¡for ¡disk ¡ resources ¡at ¡runtime ¡when ¡it ¡accepts ¡an ¡offer ¡ (allocation) ¡ ¡ ¡ ¡

masters ¡ scheduler ¡ (role-­‑baz) ¡

Accept ¡ Launch/ Create(1 ¡ TB ¡DISK) ¡

slave ¡ (2) ¡

slide-154
SLIDE 154

persistent ¡volumes ¡

framework ¡scheduler ¡reserves ¡resources ¡at ¡runtime ¡ when ¡it ¡accepts ¡an ¡offer ¡(allocation) ¡ ¡ ¡ ¡

masters ¡

Launch/ Create(1 ¡ TB ¡DISK) ¡

slave ¡ (3) ¡ scheduler ¡ (role-­‑baz) ¡

slide-155
SLIDE 155

persistent ¡volumes ¡

volumes ¡are ¡created ¡before ¡launching ¡any ¡tasks ¡or ¡ executors ¡ ¡ ¡ ¡

slave ¡

role-baz role-foo

mesos-slave

role-bar

slide-156
SLIDE 156

persistent ¡volumes ¡

volumes ¡are ¡mounted ¡into ¡the ¡container ¡when ¡a ¡ task ¡or ¡executor ¡gets ¡launched ¡ ¡ ¡

slave ¡

  • role-baz

role-foo

mesos-slave

role-bar

task

slide-157
SLIDE 157

persistent ¡volumes ¡

volumes ¡persist ¡even ¡after ¡task ¡or ¡executor ¡ terminate! ¡ ¡ ¡

slave ¡

  • role-baz

role-foo

mesos-slave

role-bar

task

slide-158
SLIDE 158

persistent ¡volumes ¡

volumes ¡persist ¡even ¡after ¡task ¡or ¡executor ¡ terminate! ¡ ¡

slave ¡

role-baz role-foo

mesos-slave

role-bar

slide-159
SLIDE 159

the ¡bigger ¡picture ¡

reservations ¡+ ¡ inverse ¡offers ¡+ ¡ persistent ¡volumes ¡= ¡ long-­‑lived ¡stateful ¡frameworks! ¡

slide-160
SLIDE 160

conclusion ¡

slide-161
SLIDE 161
  • ur ¡“other” ¡computers ¡

are ¡datacenters* ¡

* ¡collection ¡of ¡physical ¡and/or ¡virtual ¡machines ¡

slide-162
SLIDE 162
slide-163
SLIDE 163

the ¡datacenter ¡ is ¡just ¡another ¡form ¡factor ¡

slide-164
SLIDE 164

Mesos ¡is ¡the ¡kernel ¡… ¡

slide-165
SLIDE 165

desktop server datacenter OS ¡

OS ¡

OS ¡

need ¡a ¡datacenter ¡

  • perating ¡system ¡
slide-166
SLIDE 166

Mesosphere’s ¡DCOS ¡

slide-167
SLIDE 167
slide-168
SLIDE 168

Marathon ¡

Marathon, ¡a ¡scheduler ¡for ¡ running ¡stateless ¡services ¡ written ¡in ¡any ¡language ¡

init ¡for ¡the ¡datacenter ¡operating ¡system ¡

slide-169
SLIDE 169

Chronos ¡

Chronos, ¡a ¡scheduler ¡for ¡running ¡ cron ¡jobs ¡with ¡dependencies ¡

cron ¡for ¡the ¡datacenter ¡operating ¡system ¡

slide-170
SLIDE 170

DCOS ¡CLI ¡

slide-171
SLIDE 171

mesosphere.com ¡ Thanks! ¡