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

DCOS microservices

DCOS microservices

Mesos and the Architecture of the New Datacenter - Operating µServices successfully in production

The architecture of applications have changed rapidly to face the growing amount of users and data. Applications are separated to smaller, containerized, distributed and collaborating services which should scale independently. Distributed systems rely on different rules than classical monolithic applications. To minimize this problems, Mesos abstracts the complexity of distributed systems and is established as cluster manager for many big applications. In this session Johannes will show the idea and approach of cluster resource offerings build with Apache Mesos, they will introduce DC/OS (datacenter operating system) which is build on top of Mesos and show all the awesome features live during a huge Demo. He will also talk about best practices operating micro services.

Johannes Unterstein

December 15, 2016
Tweet

More Decks by Johannes Unterstein

Other Decks in Technology

Transcript

  1. © 2016 Mesosphere, Inc. All Rights Reserved. 3 Jörg Schad

    Distributed Systems Engineer @joerg_schad Johannes Unterstein Distributed Applications Engineer @unterstein
  2. © 2016 Mesosphere, Inc. All Rights Reserved. 4 In the

    beginning there was a big Monolith
  3. © 2016 Mesosphere, Inc. All Rights Reserved. Web App Hardware

    Operating System 7 DISTRIBUTION - Horizontal Scale - Fault Tolerance - Availability - Load Balancing Operating System Operating System Hardware Hardware Web App Web App
  4. © 2016 Mesosphere, Inc. All Rights Reserved. Service Service Service

    Web App Web App Web App Hardware Operating System 8 SERVICE- ORIENTED ARCHITECTURE - Separation of concerns - Optimization of bottlenecks - Smaller teams - API Contracts - Data replication - Complicated provisioning - Dependency management Operating System Operating System Hardware Hardware
  5. © 2016 Mesosphere, Inc. All Rights Reserved. Service Service Service

    Web App Web App Web App Machine Operating System 9 HARDWARE VIRTUALIZATION - Fast provisioning - Isolation - Portability - Utilization - Configuration Management - Virtual Networking - Credential management Operating System Operating System Infrastructure Machine Machine
  6. © 2016 Mesosphere, Inc. All Rights Reserved. Operating System Operating

    System Operating System Service App Service Service App App 10 MICROSERVICES - Polyglot - Single Responsibility - Smaller Teams - Utilization - Machine types/groups - Dependency hell Machine Infrastructure Machine Machine Service Service Service Service Service Service
  7. © 2016 Mesosphere, Inc. All Rights Reserved. noun | ˈmīkrō/

    /ˈsərvəs/ : an approach to application development in which a large application is built as a suite of modular services. Each module supports a specific business goal and uses a simple, well-defined interface to communicate with other modules.* Microservices are designed to be flexible, resilient, efficient, robust, and individually scalable. *From whatis.com OVERVIEW
  8. © 2016 Mesosphere, Inc. All Rights Reserved. Operating System Operating

    System Operating System Service App Service Service App App 12 MICROSERVICES - Polyglot - Single Responsibility - Smaller Teams - Utilization - Machine types/groups - Dependency hell Machine Infrastructure Machine Machine Service Service Service Service Service Service
  9. © 2016 Mesosphere, Inc. All Rights Reserved. Service App Service

    Service App App OS 14 CONTAINERS - Rapid deployment - Dependency vendoring - Container image repositories - Spreadsheet scheduling OS OS Machine Infrastructure Machine Machine Container Runtime Container Runtime Container Runtime Service Service Service Service Service Service
  10. © 2016 Mesosphere, Inc. All Rights Reserved. 18 CONTAINER SCHEDULING

    RESOURCE MANAGEMENT SERVICE MANAGEMENT - Load Balancing - Readiness Checking CONTAINER ORCHESTRATION
  11. © 2016 Mesosphere, Inc. All Rights Reserved. 19 CONTAINER SCHEDULING

    - Placement - Replication/Scaling - Resurrection - Rescheduling - Rolling Deployment - Upgrades - Downgrades - Collocation RESOURCE MANAGEMENT - Memory - CPU - GPU - Volumes - Ports - IPs - Images/Artifacts SERVICE MANAGEMENT - Labels - Groups/Namespaces - Dependencies - Load Balancing - Readiness Checking CONTAINER ORCHESTRATION
  12. © 2016 Mesosphere, Inc. All Rights Reserved. Orchestration 20 Machine

    Infrastructure Web Apps & Services Scheduling Resource Management Container Runtime Machine & OS Service Management CONTAINER ORCHESTRATION Machine & OS Machine & OS Container Runtime Container Runtime
  13. © 2016 Mesosphere, Inc. All Rights Reserved. 25 A naive

    approach to handling varied app requirements: static partitioning. Maintaining sufficient headroom to handle peak workloads on all partitions leads to poor utilization overall. KEEP IT STATIC time
  14. © 2016 Mesosphere, Inc. All Rights Reserved. 26 Multiple frameworks

    can use the same cluster resources, with their share adjusting dynamically. SHARED RESOURCES time
  15. © 2016 Mesosphere, Inc. All Rights Reserved. 27 SILOS OF

    DATA, SERVICES, USERS, ENVIRONMENTS Typical Datacenter siloed, over-provisioned servers, low utilization Modern Datacenter automated schedulers, workload multiplexing onto the same machines Industry Average 12-15% utilization Multiplexing 30-40% utilization, more at some users 4X mySQL microservice Cassandra Spark/Hadoop Kafka
  16. © 2016 Mesosphere, Inc. All Rights Reserved. 29 THE BIRTH

    OF MESOS TWITTER TECH TALK The grad students working on Mesos give a tech talk at Twitter. March 2010 APACHE INCUBATION Mesos enters the Apache Incubator. Spring 2009 CS262B Ben Hindman, Andy Konwinski and Matei Zaharia create “Nexus” as their CS262B class project. MESOS PUBLISHED Mesos: A Platform for Fine-Grained Resource Sharing in the Data Center is published as a technical report. September 2010 December 2010 DC/OS April 2016
  17. © 2016 Mesosphere, Inc. All Rights Reserved. 30 Sharing resources

    between batch processing frameworks • Hadoop • MPI • Spark What does an operating system provide? • Resource management • Programming abstractions • Security • Monitoring, debugging, logging TECHNOLOGY VISION
  18. © 2016 Mesosphere, Inc. All Rights Reserved. 2-Level Scheduling 33

    Launch Tasks Scheduler(s) Allocation User Work Resource Offers
  19. © 2016 Mesosphere, Inc. All Rights Reserved. 34 ARCHITECTURE MESOS

    FUNDAMENTALS • Agents advertise resources to Master • Master offers resources to Framework • Framework rejects/uses resources • Agents report task status to Master
  20. © 2016 Mesosphere, Inc. All Rights Reserved. 35 ARCHITECTURE MESOS

    FUNDAMENTALS • Agents advertise resources to Master • Master offers resources to Framework • Framework rejects/uses resources • Agents report task status to Master
  21. © 2016 Mesosphere, Inc. All Rights Reserved. 36 ARCHITECTURE MESOS

    FUNDAMENTALS • Agents advertise resources to Master • Master offers resources to Framework • Framework rejects/uses resources • Agents report task status to Master
  22. © 2016 Mesosphere, Inc. All Rights Reserved. 37 ARCHITECTURE MESOS

    FUNDAMENTALS • Agents advertise resources to Master • Master offers resources to Framework • Framework rejects/uses resources • Agents report task status to Master
  23. © 2016 Mesosphere, Inc. All Rights Reserved. 38 ARCHITECTURE MESOS

    FUNDAMENTALS • Agents advertise resources to Master • Master offers resources to Framework • Framework rejects/uses resources • Agents report task status to Master
  24. © 2016 Mesosphere, Inc. All Rights Reserved. 40 • Default

    Sandbox Simple to use, Task failures • Persistent Volumes Task failures, (permanent) Node failures • Distributed File System/External Storage Node failures, non-local writes STORAGE OPTIONS
  25. Datacenter Operating System (DC/OS) Distributed Systems Kernel (Mesos) DC/OS ENABLES

    MODERN DISTRIBUTED APPS Big Data + Analytics Engines Microservices (in containers) Streaming Batch Machine Learning Analytics Functions & Logic Search Time Series SQL / NoSQL Databases Modern App Components Any Infrastructure (Physical, Virtual, Cloud) 42
  26. 43 THE BASICS DC/OS is … • 100% open source

    (ASL2.0) + A big, diverse community • An umbrella for ~30 OSS projects + Roadmap and designs + Docs and tutorials • Not limited in any way • Familiar, with more features + Networking, Security, CLI, UI, Service Discovery, Load Balancing, Packages, ...
  27. 44

  28. 46

  29. © 2016 Mesosphere, Inc. All Rights Reserved. 48 • Deployment

    • Service Discovery • Monitoring • Logging GOING TO PRODUCTION
  30. © 2016 Mesosphere, Inc. All Rights Reserved. 49 DEPLOYMENT BEST

    PRACTICES • Version configurations • Private registries • Resource limits • Make it HA
  31. © 2016 Mesosphere, Inc. All Rights Reserved. • Static ports

    • Dynamic ports • Virtual IPs • DNS • Overlay networks • External tools 50 SERVICE DISCOVERY BEST PRACTICES
  32. © 2016 Mesosphere, Inc. All Rights Reserved. • Application metrics

    • Health checks • Aggregate logs • Consistent service logs 51 MONITORING & LOGGING BEST PRACTICES
  33. © 2016 Mesosphere, Inc. All Rights Reserved. 53 Questions? Code:

    https://git.io/v1DjV Psssssssst … … we are hiring! http:// grnh.se/ ie76ru
  34. © 2016 Mesosphere, Inc. All Rights Reserved. 59 Questions? Code:

    https://git.io/v1DjV Psssssssst … … we are hiring! http:// grnh.se/ ie76ru