Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Scale your Docker containers with Mesos

Scale your Docker containers with Mesos

Scale your Docker containers with Mesos
(Docker Palo Alto Meetup Oct 2014)

Timothy Chen

October 09, 2014
Tweet

More Decks by Timothy Chen

Other Decks in Programming

Transcript

  1. About me... Distributed Systems Engineer @ Mesosphere Open source: Apache

    Mesos PMC / Committer Apache Drill Committer Contribute to Apache Kafka, Spark and others
  2. Mesos is...  Open Source Apache project  Cluster Resource

    Manager  Scalable to 10,000s of nodes  Fault-tolerant, battle-tested  An SDK for distributed apps
  3. Mesos enables dynamic resource sharing http://mesosphere.io/simulator/ – + Datacenter –

    + Rails – + Hadoop – + Chronos – + Cassandra – + Spark
  4. An abstraction that let us deal with a pool of

    resources Instead of computers or VMs
  5. Making life easier for the data center operator  Multi-tenancy

     Improved resource utilization  Resource Isolation  Fault-tolerance  Easy scaling
  6. High Level View of Mesos Framework = scheduler + executor

    Schedulers get resource offers Executors run tasks
  7. Mesos has multiple ways of achiving resource isolation Mesos Containerizer

    (LXC -> Cgroups) External Containerizer Docker Containerizer!
  8. Marathon does it! Start, stop, scale, update apps Nice web

    interface, API Highly available, no SPoF Native Docker support Pluggable event bus Rolling deploy / restart Application health checks Artifact staging
  9. Run a Docker container h t t p - v

    P O S T h t t p : / / 1 0 . 0 . 8 5 . 9 7 : 8 0 8 0 / v 2 / a p p s @ a p p - r u b y . j s o n { " i d " : " b r i d g e d - w e b a p p " , " c m d " : " p y t h o n 3 - m h t t p . s e r v e r 8 0 8 0 " , " c p u s " : 0 . 5 , " m e m " : 6 4 . 0 , " i n s t a n c e s " : 1 , " c o n t a i n e r " : { " t y p e " : " D O C K E R " , " d o c k e r " : { " i m a g e " : " p y t h o n : 3 " , " n e t w o r k " : " B R I D G E " , " p o r t M a p p i n g s " : [ { " c o n t a i n e r P o r t " : 8 0 8 0 , " h o s t P o r t " : 0 , " p r o t o c o l " : " t c p " } ] } } }
  10. Add a UNIQUE hostname constraint { " c o n

    s t r a i n t s " : [ [ " h o s t n a m e " , " U N I Q U E " ] ] }
  11. Thanks! Come and talk to us Get Mesosphere packages: Kubernetes

    on Mesos: Read about Marathon: Try out Mesosphere on GCE: http://mesosphere.io/downloads https://github.com/mesosphere/kubernetes-mesos https://github.com/mesosphere/marathon http://google.mesosphere.io