SlideShare a Scribd company logo
1 of 40
Download to read offline
YOU CALL THAT MICRO, MR. DOCKER? 

HOW OSV AND UNIKERNELS HELP MICRO-SERVICES STAY MICRO
Roman Shaposhnik @rhatr, Pivotal Inc.
It	
  is	
  2015	
  and	
  everybody	
  loves	
  PaaS	
  
Cloud	
  Foundry	
  	
  
No,	
  but	
  seriously?	
  
	
  	
  	
  
	
  myApp	
   $	
  cf	
  push	
   …	
  
service	
  #N	
  
service	
  #1	
  
…	
  
service	
  #Z	
  
service	
  #M	
  
…	
  
Forget	
  OOP,	
  it	
  is	
  0xCOP	
  (12factor.net)	
  
•  Codebase	
  
•  Dependencies	
  
•  Config	
  
•  Backing	
  services	
  
•  Build,	
  deploy,	
  run	
  
•  Stateless	
  processes	
  
•  Port	
  binding	
  
•  Concurrency	
  
•  Disposability	
  
•  Dev	
  ==	
  prod	
  
•  Logs	
  ==	
  streams	
  
•  Admin	
  processes	
  
Forget	
  OOP,	
  it	
  is	
  0xCOP	
  (12factor.net)	
  
•  Codebase	
  
•  Dependencies	
  
•  Config	
  
•  Backing	
  services	
  
•  Build,	
  deploy,	
  run	
  
•  Stateless	
  processes	
  
•  Port	
  binding	
  
•  Concurrency	
  
•  Disposability	
  
•  Dev	
  ==	
  prod	
  
•  Logs	
  ==	
  streams	
  
•  Admin	
  processes	
  
What	
  about	
  stateful?	
  
	
  	
  	
  	
  	
  	
  HDFS	
  
Zookeeper	
  
HBase	
  
region	
  
server	
  
…	
  
I	
  am	
  alive	
  
Who	
  Am	
  I?	
  
What	
  do	
  I	
  do?	
  
HBase	
  
region	
  
server	
  
And	
  when	
  it	
  fails?	
  
	
  	
  	
  	
  	
  	
  HDFS	
  
Zookeeper	
  
HBase	
  
region	
  
server	
  
…	
  
Node	
  died	
  
You,	
  pitch	
  in!	
  
Aye,	
  aye	
  captain	
  
μservice-­‐based	
  deployment	
  
	
  	
  	
  	
  	
  	
  HDFS	
  
Zookeeper	
  
HBase	
  
region	
  
server	
  
…	
  
I	
  am	
  alive	
  
Who	
  Am	
  I?	
  
What	
  do	
  I	
  do?	
  
HBase	
  
region	
  
server	
  
Lets	
  zoom	
  in	
  
…	
  
service	
  #N	
  
service	
  #1	
  
Anatomy	
  of	
  a	
  μservice	
  
Hardware	
  
“Stuff”	
  
[Java]	
  Virtual	
  Machine	
  
μservice	
  code	
  
How	
  are	
  we	
  doing	
  it	
  today?	
  
Hardware	
  
pkg1	
  
[Java]	
  Virtual	
  Machine	
  
μservice	
  code	
  
pkgN	
  ………….	
  
“OS”	
  Linux	
  kernel	
  
Puppet,	
  Chef	
  
Huge	
  VM	
  image	
  
Is	
  there	
  a	
  beber	
  way?	
  
vHardware	
  
	
  
	
  
Hardware	
  
[Java]	
  Virtual	
  Machine	
  
libFS,	
  libC,	
  libJVM	
  
μservice	
  code	
  
Applicacon-­‐specific	
  
stacc	
  linking	
  
Tiny	
  VM	
  image	
  AKA	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  unikernel	
  
Hardware-­‐assisted	
  virtualizacon	
  
What	
  the	
  heck	
  is	
  a	
  FOOkernel?	
  
•  What	
  OS	
  design	
  courses	
  have	
  taught	
  us?	
  
– microkernels	
  vs.	
  monolithic	
  kernels	
  
•  What	
  did	
  they	
  lef	
  behind?	
  
– exokernels,	
  nano	
  
•  What	
  they	
  should’ve	
  taught	
  us	
  instead:	
  
– unikernels,	
  anykernels	
  
Unikernels	
  
•  “Unikernels:	
  library	
  operacng	
  systems	
  for	
  the	
  
cloud”	
  came	
  out	
  in	
  2013	
  
•  A	
  “library”	
  operacng	
  system	
  
•  A	
  kernel	
  that	
  can	
  only	
  support	
  one	
  process	
  
Anykernels	
  
•  Programming	
  discipline	
  for	
  kernel	
  code	
  reuse	
  
•  “The	
  Design	
  and	
  Implementacon	
  of	
  the	
  
Anykernel	
  and	
  Rump	
  Kernels”	
  by	
  A.	
  Kantee	
  
•  Capabilices	
  
–  NetBSD	
  filesystems	
  as	
  Linux	
  processes	
  
–  User-­‐space	
  TCP/IP	
  stack	
  	
  
•  Building	
  blocks	
  for…	
  any	
  kernels	
  
OSv	
  from	
  Cloudius	
  Systems	
  
•  A	
  unikernel	
  for	
  “POSIX”	
  and	
  memory	
  managed	
  
planorms	
  (JVM,	
  Go,	
  Lua)	
  
•  Anykernel’ish	
  
–  E.g.	
  ZFS	
  
•  Runs	
  on	
  top	
  of	
  KVM,	
  Xen,	
  VirtualBox,	
  VMWare	
  
•  Looks	
  like	
  an	
  app	
  to	
  the	
  host	
  OS	
  
•  Small,	
  fast	
  and	
  easy	
  to	
  manage	
  at	
  scale	
  
OSv	
  manifesto	
  
•  Run	
  exiscng	
  Linux	
  applicacons	
  
•  Run	
  exiscng	
  Linux	
  applicacons	
  faster	
  
•  Make	
  boot	
  cme	
  ~=	
  exec	
  cme	
  
•  Explore	
  APIs	
  beyond	
  POSIX	
  
•  Leverage	
  memory	
  managed	
  planorms	
  (JVM,	
  Go)	
  
•  Stay	
  open	
  
What’s	
  inside?	
  
single	
  address	
  space	
  in	
  “kernel	
  mode”	
  
“kernel	
  threads”	
  
“user	
  threads”	
  
disk	
  ZFS	
   virco	
  C++	
  kernel	
  
code	
  
dynamic	
  linker	
  
libjvm.so	
  ifconfig.so	
  
TCP/IP	
  
iface	
  
Anything	
  it	
  can’t	
  do?	
  
•  A	
  100%	
  replacement	
  for	
  a	
  Linux	
  kernel	
  
– No	
  fork()ing	
  
•  No	
  process	
  isolacon	
  
•  The	
  least	
  amount	
  of	
  device	
  drivers	
  ever	
  
Virtualizacon	
  vs.	
  performance	
  
•  Network-­‐intensive	
  apps:	
  
–  unmodified:	
  25%	
  gain	
  in	
  throughput	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  47%	
  decrease	
  in	
  latency	
  
–  non-­‐POSIX	
  APIs	
  use	
  for	
  Memcached:	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  290%	
  increase	
  in	
  performance	
  
•  Compute-­‐intensive	
  apps:	
  
–  YMMV	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
Van	
  Jacabson’s	
  net	
  channels	
  
socket	
  
TCP	
  
IP	
  
iface	
  
socket	
  
TCP	
  
IP	
  
iface	
  
lock	
  
lock	
  
lock	
  
Tradiconal	
  TCP/IP	
  stack	
  
	
  	
  app	
  thread	
  	
  	
  	
  	
  	
  	
  	
  	
  kernel	
  (IRQ)	
  
send/recv	
  
socket	
  
TCP	
  
IP	
  
iface	
  
channel	
  
classifier	
  
iface	
  
lock	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  OSv	
  TCP/IP	
  stack	
  	
  
	
  	
  app	
  thread	
  	
  	
  	
  	
  	
  	
  	
  	
  kernel	
  (IRQ)	
  
send/recv	
  
Memory	
  management	
  in	
  UNIX	
  
OS	
  Memory	
  
Process	
  Memory	
  
JVM	
  Heap	
  
Process	
  Memory	
  
JVM	
  Heap	
  
Memory	
  management	
  in	
  OSv	
  
OS	
  Memory	
  
Process	
  Memory	
  
JVM	
  Heap	
  
JVM	
  balooning	
  (no	
  more	
  -­‐Xmx)	
  
JVM	
  Heap	
  
OS	
  object	
  
Turbo	
  charging	
  JVM	
  GC	
  	
  
object	
  1	
   object	
  2	
  
Turbo	
  charging	
  JVM	
  GC	
  	
  
object	
  1	
   object	
  2	
  
Turbo	
  charging	
  JVM	
  GC	
  	
  
object	
  1	
   object	
  2	
  
CPU	
  MMU	
  assisted	
  tracking	
  table	
  	
  
But	
  what	
  about	
  Docker?	
  
Jailed	
  FS,	
  net,	
  etc.	
  
	
  
	
  
Hardware	
  
[Java]	
  Virtual	
  Machine	
  
libFS,	
  libC,	
  libJVM	
  
μservice	
  code	
  
Applicacon-­‐specific	
  
stacc	
  linking	
  
Docker	
  image	
  
Common,	
  shared	
  kernel	
  
Docker	
  !=	
  LXC	
  
•  $	
  docker	
  run	
  roman/PetClinic	
  
•  Socially-­‐driven	
  image	
  sharing	
  
Ubuntu	
  14.04	
  
Canonical	
  
Tomcat	
  
Pivotal	
  
Go	
  
Google	
  
PetClinic	
  
Roman	
  
PetClinic	
  
service	
  #N	
  
service	
  #1	
  
$	
  docker	
  run	
  
Why	
  should	
  it	
  work	
  this	
  cme?	
  
•  Unikernels/exokernels	
  back	
  in	
  ’90	
  
•  JVM-­‐on-­‐bare-­‐metal	
  (Azul,	
  BEA,	
  etc.)	
  back	
  in	
  ‘00	
  
•  Things	
  they	
  didn’t	
  have	
  back	
  then	
  
–  HW-­‐assisted	
  virtualizacon	
  (KVM,	
  XEN,	
  etc.)	
  
–  Elascc	
  infrastructure	
  oriented	
  architectures	
  
–  Cloud	
  Foundry	
  
No,	
  really	
  we	
  need	
  PaaS	
  
No,	
  really	
  we	
  need	
  PaaS	
  
Elascc,	
  next	
  generacon	
  datacenter	
  
•  Commodity,	
  rack-­‐provisioned	
  Hardware	
  
•  Commodity,	
  JeOS	
  to	
  get	
  to	
  Docker++	
  
– CoreOS,	
  SmartOS	
  
•  Docker++	
  as	
  a	
  common	
  backed	
  
– Osv	
  	
  
•  Cloud	
  Foundry	
  to	
  rule	
  them	
  all	
  
Finally	
  killing	
  DevOps	
  
•  Ops	
  (IT)	
  maintains	
  the	
  bare	
  OS	
  
•  Devs	
  maintain	
  the	
  μservices	
  	
  
•  PaaS	
  maps	
  μservices	
  
to	
  images	
  and	
  orchestrates	
  
Finally	
  killing	
  DevOps	
  
•  Ops	
  (IT)	
  maintains	
  the	
  bare	
  OS	
  
•  Devs	
  maintain	
  the	
  μservices	
  	
  
•  PaaS	
  maps	
  μservices	
  
to	
  images	
  and	
  orchestrates	
  
Guinea	
  pigs	
  so	
  far	
  
•  Cloudius	
  
– Memcached	
  
– Apache	
  Cassandra	
  
– Redis	
  
•  Pivotal	
  
– Apache	
  Geode	
  (incubacng)	
  
Apache	
  Geode	
  (incubacng)	
  
•  Formerly	
  known	
  as	
  Gemfire	
  
•  Distributed,	
  fully	
  consistent,	
  in-­‐memory	
  
database/cache	
  system	
  with	
  transaccons	
  
•  Key-­‐value	
  client	
  API	
  
•  Java	
  based	
  
•  Peer-­‐to-­‐peer	
  distributed	
  system	
  
Quescons?	
  
By	
  @cloud_opinion	
  
	
  
Imagine	
  no	
  planorms	
  
I	
  wonder	
  if	
  you	
  can	
  
No	
  need	
  for	
  PAAS	
  or	
  IAAS	
  
A	
  brotherhood	
  of	
  bare	
  metal	
  
	
  
Imagine	
  there	
  is	
  no	
  VM	
  
It's	
  easy	
  if	
  you	
  try	
  
No	
  host	
  below	
  us	
  
Above	
  us	
  only	
  apps	
  
You Call that Micro, Mr. Docker? How OSv and Unikernels Help Micro-services Stay Micro

More Related Content

What's hot

Optimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMUOptimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMU
OpenStack Foundation
 
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
ScyllaDB
 

What's hot (20)

runC: The little engine that could (run Docker containers) by Docker Captain ...
runC: The little engine that could (run Docker containers) by Docker Captain ...runC: The little engine that could (run Docker containers) by Docker Captain ...
runC: The little engine that could (run Docker containers) by Docker Captain ...
 
XPDS14 - Scaling Xen's Aggregate Storage Performance - Felipe Franciosi, Citrix
XPDS14 - Scaling Xen's Aggregate Storage Performance - Felipe Franciosi, CitrixXPDS14 - Scaling Xen's Aggregate Storage Performance - Felipe Franciosi, Citrix
XPDS14 - Scaling Xen's Aggregate Storage Performance - Felipe Franciosi, Citrix
 
[En] IPVS for Docker Containers
[En] IPVS for Docker Containers[En] IPVS for Docker Containers
[En] IPVS for Docker Containers
 
Docker Orchestration at Production Scale
Docker Orchestration at Production Scale Docker Orchestration at Production Scale
Docker Orchestration at Production Scale
 
Live migrating a container: pros, cons and gotchas
Live migrating a container: pros, cons and gotchasLive migrating a container: pros, cons and gotchas
Live migrating a container: pros, cons and gotchas
 
OpenNebulaConf 2016 - Measuring and tuning VM performance by Boyan Krosnov, S...
OpenNebulaConf 2016 - Measuring and tuning VM performance by Boyan Krosnov, S...OpenNebulaConf 2016 - Measuring and tuning VM performance by Boyan Krosnov, S...
OpenNebulaConf 2016 - Measuring and tuning VM performance by Boyan Krosnov, S...
 
Unikernels: the rise of the library hypervisor in MirageOS
Unikernels: the rise of the library hypervisor in MirageOSUnikernels: the rise of the library hypervisor in MirageOS
Unikernels: the rise of the library hypervisor in MirageOS
 
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea LuzzardiWhat's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
 
AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...
AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...
AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...
 
Optimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMUOptimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMU
 
Re-Think of Virtualization and Containerization
Re-Think of Virtualization and ContainerizationRe-Think of Virtualization and Containerization
Re-Think of Virtualization and Containerization
 
Scaling and Managing Cassandra with docker, CoreOS and Presto
Scaling and Managing Cassandra with docker, CoreOS and PrestoScaling and Managing Cassandra with docker, CoreOS and Presto
Scaling and Managing Cassandra with docker, CoreOS and Presto
 
Develop QNAP NAS App by Docker
Develop QNAP NAS App by DockerDevelop QNAP NAS App by Docker
Develop QNAP NAS App by Docker
 
NkSIP: The Erlang SIP application server
NkSIP: The Erlang SIP application serverNkSIP: The Erlang SIP application server
NkSIP: The Erlang SIP application server
 
Couch to OpenStack: Cinder - August 6, 2013
Couch to OpenStack: Cinder - August 6, 2013Couch to OpenStack: Cinder - August 6, 2013
Couch to OpenStack: Cinder - August 6, 2013
 
Nested Virtualization Update from Intel
Nested Virtualization Update from IntelNested Virtualization Update from Intel
Nested Virtualization Update from Intel
 
QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?
 
Wanting distributed volumes - Experiences with ceph-docker
Wanting distributed volumes - Experiences with ceph-dockerWanting distributed volumes - Experiences with ceph-docker
Wanting distributed volumes - Experiences with ceph-docker
 
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
 
Container orchestration
Container orchestrationContainer orchestration
Container orchestration
 

Viewers also liked

Viewers also liked (10)

Unikernels and another way of secure cloud computing
Unikernels and another way of secure cloud computingUnikernels and another way of secure cloud computing
Unikernels and another way of secure cloud computing
 
Libra: a Library OS for a JVM
Libra: a Library OS for a JVMLibra: a Library OS for a JVM
Libra: a Library OS for a JVM
 
Micro Services Architecture
Micro Services ArchitectureMicro Services Architecture
Micro Services Architecture
 
micro services architecture (FrosCon2014)
micro services architecture (FrosCon2014)micro services architecture (FrosCon2014)
micro services architecture (FrosCon2014)
 
Seastar / ScyllaDB, or how we implemented a 10-times faster Cassandra
Seastar / ScyllaDB,  or how we implemented a 10-times faster CassandraSeastar / ScyllaDB,  or how we implemented a 10-times faster Cassandra
Seastar / ScyllaDB, or how we implemented a 10-times faster Cassandra
 
Code Your Agility - Tips for Boosting Technical Agility in Your Organization
Code Your Agility - Tips for Boosting Technical Agility in Your OrganizationCode Your Agility - Tips for Boosting Technical Agility in Your Organization
Code Your Agility - Tips for Boosting Technical Agility in Your Organization
 
A Gentle Introduction to Micro Services - From Theory into Practice
A Gentle Introduction to Micro Services - From Theory into PracticeA Gentle Introduction to Micro Services - From Theory into Practice
A Gentle Introduction to Micro Services - From Theory into Practice
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
 
DevExperience - The Dark Side of Microservices
DevExperience - The Dark Side of MicroservicesDevExperience - The Dark Side of Microservices
DevExperience - The Dark Side of Microservices
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 

Similar to You Call that Micro, Mr. Docker? How OSv and Unikernels Help Micro-services Stay Micro

What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
HostedbyConfluent
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deployment
javaonfly
 
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
dotCloud
 

Similar to You Call that Micro, Mr. Docker? How OSv and Unikernels Help Micro-services Stay Micro (20)

Containers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshellContainers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshell
 
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWSCloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
 
LASUG Online: Introduction to Docker and Docker Tools
LASUG Online: Introduction to Docker and Docker ToolsLASUG Online: Introduction to Docker and Docker Tools
LASUG Online: Introduction to Docker and Docker Tools
 
Cont0519
Cont0519Cont0519
Cont0519
 
Containers #101 Meetup: Containers and OpenStack
Containers #101 Meetup: Containers and OpenStackContainers #101 Meetup: Containers and OpenStack
Containers #101 Meetup: Containers and OpenStack
 
Containers #101 Meetup: Containers & OpenStack
Containers #101 Meetup: Containers & OpenStack Containers #101 Meetup: Containers & OpenStack
Containers #101 Meetup: Containers & OpenStack
 
OpenStack Summit
OpenStack SummitOpenStack Summit
OpenStack Summit
 
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deployment
 
Chicago Microservices Integration Talk
Chicago Microservices Integration TalkChicago Microservices Integration Talk
Chicago Microservices Integration Talk
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
 
Docker-Intro
Docker-IntroDocker-Intro
Docker-Intro
 
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
 
Containers and OpenStack: Marc Van Hoof, Kumulus: Containers and OpenStack
Containers and OpenStack: Marc Van Hoof, Kumulus: Containers and OpenStackContainers and OpenStack: Marc Van Hoof, Kumulus: Containers and OpenStack
Containers and OpenStack: Marc Van Hoof, Kumulus: Containers and OpenStack
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment
 
RTP NPUG: Ansible Intro and Integration with ACI
RTP NPUG: Ansible Intro and Integration with ACIRTP NPUG: Ansible Intro and Integration with ACI
RTP NPUG: Ansible Intro and Integration with ACI
 
Serverless design with Fn project
Serverless design with Fn projectServerless design with Fn project
Serverless design with Fn project
 
Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)
 
A closer look to locaweb IaaS
A closer look to locaweb IaaSA closer look to locaweb IaaS
A closer look to locaweb IaaS
 

More from rhatr

Introduction into scalable graph analysis with Apache Giraph and Spark GraphX
Introduction into scalable graph analysis with Apache Giraph and Spark GraphXIntroduction into scalable graph analysis with Apache Giraph and Spark GraphX
Introduction into scalable graph analysis with Apache Giraph and Spark GraphX
rhatr
 
Elephant in the cloud
Elephant in the cloudElephant in the cloud
Elephant in the cloud
rhatr
 

More from rhatr (8)

Unikernels: in search of a killer app and a killer ecosystem
Unikernels: in search of a killer app and a killer ecosystemUnikernels: in search of a killer app and a killer ecosystem
Unikernels: in search of a killer app and a killer ecosystem
 
Introduction into scalable graph analysis with Apache Giraph and Spark GraphX
Introduction into scalable graph analysis with Apache Giraph and Spark GraphXIntroduction into scalable graph analysis with Apache Giraph and Spark GraphX
Introduction into scalable graph analysis with Apache Giraph and Spark GraphX
 
Tachyon and Apache Spark
Tachyon and Apache SparkTachyon and Apache Spark
Tachyon and Apache Spark
 
Apache Spark: killer or savior of Apache Hadoop?
Apache Spark: killer or savior of Apache Hadoop?Apache Spark: killer or savior of Apache Hadoop?
Apache Spark: killer or savior of Apache Hadoop?
 
Apache Bigtop: a crash course in deploying a Hadoop bigdata management platform
Apache Bigtop: a crash course in deploying a Hadoop bigdata management platformApache Bigtop: a crash course in deploying a Hadoop bigdata management platform
Apache Bigtop: a crash course in deploying a Hadoop bigdata management platform
 
Apache Giraph: start analyzing graph relationships in your bigdata in 45 minu...
Apache Giraph: start analyzing graph relationships in your bigdata in 45 minu...Apache Giraph: start analyzing graph relationships in your bigdata in 45 minu...
Apache Giraph: start analyzing graph relationships in your bigdata in 45 minu...
 
Building Google-in-a-box: using Apache SolrCloud and Bigtop to index your big...
Building Google-in-a-box: using Apache SolrCloud and Bigtop to index your big...Building Google-in-a-box: using Apache SolrCloud and Bigtop to index your big...
Building Google-in-a-box: using Apache SolrCloud and Bigtop to index your big...
 
Elephant in the cloud
Elephant in the cloudElephant in the cloud
Elephant in the cloud
 

Recently uploaded

AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 

Recently uploaded (20)

UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spain
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 

You Call that Micro, Mr. Docker? How OSv and Unikernels Help Micro-services Stay Micro

  • 1. YOU CALL THAT MICRO, MR. DOCKER? 
 HOW OSV AND UNIKERNELS HELP MICRO-SERVICES STAY MICRO Roman Shaposhnik @rhatr, Pivotal Inc.
  • 2. It  is  2015  and  everybody  loves  PaaS  
  • 4. No,  but  seriously?          myApp   $  cf  push   …   service  #N   service  #1   …   service  #Z   service  #M   …  
  • 5. Forget  OOP,  it  is  0xCOP  (12factor.net)   •  Codebase   •  Dependencies   •  Config   •  Backing  services   •  Build,  deploy,  run   •  Stateless  processes   •  Port  binding   •  Concurrency   •  Disposability   •  Dev  ==  prod   •  Logs  ==  streams   •  Admin  processes  
  • 6. Forget  OOP,  it  is  0xCOP  (12factor.net)   •  Codebase   •  Dependencies   •  Config   •  Backing  services   •  Build,  deploy,  run   •  Stateless  processes   •  Port  binding   •  Concurrency   •  Disposability   •  Dev  ==  prod   •  Logs  ==  streams   •  Admin  processes  
  • 7. What  about  stateful?              HDFS   Zookeeper   HBase   region   server   …   I  am  alive   Who  Am  I?   What  do  I  do?   HBase   region   server  
  • 8. And  when  it  fails?              HDFS   Zookeeper   HBase   region   server   …   Node  died   You,  pitch  in!   Aye,  aye  captain  
  • 9. μservice-­‐based  deployment              HDFS   Zookeeper   HBase   region   server   …   I  am  alive   Who  Am  I?   What  do  I  do?   HBase   region   server  
  • 10. Lets  zoom  in   …   service  #N   service  #1  
  • 11. Anatomy  of  a  μservice   Hardware   “Stuff”   [Java]  Virtual  Machine   μservice  code  
  • 12. How  are  we  doing  it  today?   Hardware   pkg1   [Java]  Virtual  Machine   μservice  code   pkgN  ………….   “OS”  Linux  kernel   Puppet,  Chef   Huge  VM  image  
  • 13. Is  there  a  beber  way?   vHardware       Hardware   [Java]  Virtual  Machine   libFS,  libC,  libJVM   μservice  code   Applicacon-­‐specific   stacc  linking   Tiny  VM  image  AKA                      unikernel   Hardware-­‐assisted  virtualizacon  
  • 14. What  the  heck  is  a  FOOkernel?   •  What  OS  design  courses  have  taught  us?   – microkernels  vs.  monolithic  kernels   •  What  did  they  lef  behind?   – exokernels,  nano   •  What  they  should’ve  taught  us  instead:   – unikernels,  anykernels  
  • 15. Unikernels   •  “Unikernels:  library  operacng  systems  for  the   cloud”  came  out  in  2013   •  A  “library”  operacng  system   •  A  kernel  that  can  only  support  one  process  
  • 16. Anykernels   •  Programming  discipline  for  kernel  code  reuse   •  “The  Design  and  Implementacon  of  the   Anykernel  and  Rump  Kernels”  by  A.  Kantee   •  Capabilices   –  NetBSD  filesystems  as  Linux  processes   –  User-­‐space  TCP/IP  stack     •  Building  blocks  for…  any  kernels  
  • 17. OSv  from  Cloudius  Systems   •  A  unikernel  for  “POSIX”  and  memory  managed   planorms  (JVM,  Go,  Lua)   •  Anykernel’ish   –  E.g.  ZFS   •  Runs  on  top  of  KVM,  Xen,  VirtualBox,  VMWare   •  Looks  like  an  app  to  the  host  OS   •  Small,  fast  and  easy  to  manage  at  scale  
  • 18. OSv  manifesto   •  Run  exiscng  Linux  applicacons   •  Run  exiscng  Linux  applicacons  faster   •  Make  boot  cme  ~=  exec  cme   •  Explore  APIs  beyond  POSIX   •  Leverage  memory  managed  planorms  (JVM,  Go)   •  Stay  open  
  • 19. What’s  inside?   single  address  space  in  “kernel  mode”   “kernel  threads”   “user  threads”   disk  ZFS   virco  C++  kernel   code   dynamic  linker   libjvm.so  ifconfig.so   TCP/IP   iface  
  • 20. Anything  it  can’t  do?   •  A  100%  replacement  for  a  Linux  kernel   – No  fork()ing   •  No  process  isolacon   •  The  least  amount  of  device  drivers  ever  
  • 21. Virtualizacon  vs.  performance   •  Network-­‐intensive  apps:   –  unmodified:  25%  gain  in  throughput                                                47%  decrease  in  latency   –  non-­‐POSIX  APIs  use  for  Memcached:                                                                                              290%  increase  in  performance   •  Compute-­‐intensive  apps:   –  YMMV                                                                
  • 22. Van  Jacabson’s  net  channels   socket   TCP   IP   iface   socket   TCP   IP   iface   lock   lock   lock   Tradiconal  TCP/IP  stack      app  thread                  kernel  (IRQ)   send/recv   socket   TCP   IP   iface   channel   classifier   iface   lock                    OSv  TCP/IP  stack        app  thread                  kernel  (IRQ)   send/recv  
  • 23. Memory  management  in  UNIX   OS  Memory   Process  Memory   JVM  Heap   Process  Memory   JVM  Heap  
  • 24. Memory  management  in  OSv   OS  Memory   Process  Memory   JVM  Heap  
  • 25. JVM  balooning  (no  more  -­‐Xmx)   JVM  Heap   OS  object  
  • 26. Turbo  charging  JVM  GC     object  1   object  2  
  • 27. Turbo  charging  JVM  GC     object  1   object  2  
  • 28. Turbo  charging  JVM  GC     object  1   object  2   CPU  MMU  assisted  tracking  table    
  • 29. But  what  about  Docker?   Jailed  FS,  net,  etc.       Hardware   [Java]  Virtual  Machine   libFS,  libC,  libJVM   μservice  code   Applicacon-­‐specific   stacc  linking   Docker  image   Common,  shared  kernel  
  • 30. Docker  !=  LXC   •  $  docker  run  roman/PetClinic   •  Socially-­‐driven  image  sharing   Ubuntu  14.04   Canonical   Tomcat   Pivotal   Go   Google   PetClinic   Roman   PetClinic   service  #N   service  #1   $  docker  run  
  • 31. Why  should  it  work  this  cme?   •  Unikernels/exokernels  back  in  ’90   •  JVM-­‐on-­‐bare-­‐metal  (Azul,  BEA,  etc.)  back  in  ‘00   •  Things  they  didn’t  have  back  then   –  HW-­‐assisted  virtualizacon  (KVM,  XEN,  etc.)   –  Elascc  infrastructure  oriented  architectures   –  Cloud  Foundry  
  • 32. No,  really  we  need  PaaS  
  • 33. No,  really  we  need  PaaS  
  • 34. Elascc,  next  generacon  datacenter   •  Commodity,  rack-­‐provisioned  Hardware   •  Commodity,  JeOS  to  get  to  Docker++   – CoreOS,  SmartOS   •  Docker++  as  a  common  backed   – Osv     •  Cloud  Foundry  to  rule  them  all  
  • 35. Finally  killing  DevOps   •  Ops  (IT)  maintains  the  bare  OS   •  Devs  maintain  the  μservices     •  PaaS  maps  μservices   to  images  and  orchestrates  
  • 36. Finally  killing  DevOps   •  Ops  (IT)  maintains  the  bare  OS   •  Devs  maintain  the  μservices     •  PaaS  maps  μservices   to  images  and  orchestrates  
  • 37. Guinea  pigs  so  far   •  Cloudius   – Memcached   – Apache  Cassandra   – Redis   •  Pivotal   – Apache  Geode  (incubacng)  
  • 38. Apache  Geode  (incubacng)   •  Formerly  known  as  Gemfire   •  Distributed,  fully  consistent,  in-­‐memory   database/cache  system  with  transaccons   •  Key-­‐value  client  API   •  Java  based   •  Peer-­‐to-­‐peer  distributed  system  
  • 39. Quescons?   By  @cloud_opinion     Imagine  no  planorms   I  wonder  if  you  can   No  need  for  PAAS  or  IAAS   A  brotherhood  of  bare  metal     Imagine  there  is  no  VM   It's  easy  if  you  try   No  host  below  us   Above  us  only  apps