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.

7c6d957f56a234a73c0a321bbdd5ebee?s=128

Johannes Unterstein

December 15, 2016
Tweet

More Decks by Johannes Unterstein

Other Decks in Technology

Transcript

  1. 1 Mesos and the Architecture of the New Datacenter BuzzWord

    Bingo 2.0 @unterstein @joerg_schad
  2. © 2016 Mesosphere, Inc. All Rights Reserved. 3 Jörg Schad

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

    beginning there was a big Monolith
  4. © 2016 Mesosphere, Inc. All Rights Reserved. Hardware Operating System

    Application 5 COMPUTERS
  5. © 2016 Mesosphere, Inc. All Rights Reserved. Hardware Operating System

    Web Application 6 INTERNET - Remote Users!
  6. © 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
  7. © 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
  8. © 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
  9. © 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
  10. © 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
  11. © 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
  12. © Gerard Julien/AFP Run everything in containers!

  13. © 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
  14. © 2016 Mesosphere, Inc. All Rights Reserved. CONTAINER SCHEDULING 15

  15. © 2016 Mesosphere, Inc. All Rights Reserved. RESOURCE MANAGEMENT 16

  16. © 2016 Mesosphere, Inc. All Rights Reserved. SERVICE MANAGEMENT 17

  17. © 2016 Mesosphere, Inc. All Rights Reserved. 18 CONTAINER SCHEDULING

    RESOURCE MANAGEMENT SERVICE MANAGEMENT - Load Balancing - Readiness Checking CONTAINER ORCHESTRATION
  18. © 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
  19. © 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
  20. © 2016 Mesosphere, Inc. All Rights Reserved. 21 MapReduce is

    crunching Data Meanwhile...
  21. © 2016 Mesosphere, Inc. All Rights Reserved. 22 Modern datacenter

  22. Flink Cassandra µServices Spark RDB

  23. Flink Cassandra µServices Spark RDB

  24. © 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
  25. © 2016 Mesosphere, Inc. All Rights Reserved. 26 Multiple frameworks

    can use the same cluster resources, with their share adjusting dynamically. SHARED RESOURCES time
  26. © 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
  27. © 2016 Mesosphere, Inc. All Rights Reserved. 28

  28. © 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
  29. © 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
  30. © 2016 Mesosphere, Inc. All Rights Reserved. 31 Apache Mesos

  31. © 2016 Mesosphere, Inc. All Rights Reserved. 32 ARCHITECTURE MESOS

    FUNDAMENTALS
  32. © 2016 Mesosphere, Inc. All Rights Reserved. 2-Level Scheduling 33

    Launch Tasks Scheduler(s) Allocation User Work Resource Offers
  33. © 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
  34. © 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
  35. © 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
  36. © 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
  37. © 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
  38. © 2016 Mesosphere, Inc. All Rights Reserved. 39 PERSISTENCE

  39. © 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
  40. © 2016 Mesosphere, Inc. All Rights Reserved. 41

  41. 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
  42. 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, ...
  43. 44

  44. 45 THE UNIVERSE

  45. 46

  46. © 2016 Mesosphere, Inc. All Rights Reserved. 47 Best Practices

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

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

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

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

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

    https://git.io/v1DjV Psssssssst … … we are hiring! http:// grnh.se/ ie76ru
  52. © 2016 Mesosphere, Inc. All Rights Reserved. 54 Well …

  53. © 2016 Mesosphere, Inc. All Rights Reserved. 55 … let`s

    talk about data
  54. © 2016 Mesosphere, Inc. All Rights Reserved. 56 Persistence Data

  55. © 2016 Mesosphere, Inc. All Rights Reserved. 57 Big Data

  56. © 2016 Mesosphere, Inc. All Rights Reserved. 58 Fast Data

  57. © 2016 Mesosphere, Inc. All Rights Reserved. 59 Questions? Code:

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