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

Filesystems, SQL and NoSQL with Apache Mesos

Filesystems, SQL and NoSQL with Apache Mesos

Michael Hausenblas

October 05, 2015
Tweet

More Decks by Michael Hausenblas

Other Decks in Technology

Transcript

  1. © 2015 Mesosphere, Inc. All Rights Reserved. FILESYSTEMS, SQL AND

    NOSQL WITH
 APACHE MESOS 1 Michael Hausenblas, Developer & Cloud Advocate | 2015-10-05 | CloudOpen Dublin, Ireland
  2. © 2015 Mesosphere, Inc. All Rights Reserved. DEFINITIONS 6 •

    A centralized service runs on one machine • A distributed service runs on two or more machines that are connected via a network • A stateless service persists (no significant) state • A stateful service persists state
  3. © 2015 Mesosphere, Inc. All Rights Reserved. EXAMPLES 7 #

    a stateless, centralized service cat /dev/random # a stateless, distributed service (Marathon) http PUT http://1.2.3.4:8080/v2/apps < app.json # a stateful, centralized service (redirect to file) echo 'lolwut' > ./some.dat # a stateful, distributed service (HDFS) hadoop fs -put ./some.dat hdfs:///user/me/some.dat
  4. © 2015 Mesosphere, Inc. All Rights Reserved. ARCHITECTURE 10 Mesos

    http://mesos.berkeley.edu/mesos_tech_report.pdf *) now: agent *
  5. © 2015 Mesosphere, Inc. All Rights Reserved. RESOURCES 11 Mesos

    • resource == anything a task/executor consumes in order to do their work • standard resources: cpu, mem, disk, ports • define your own, for example:
 --attributes='host_os:ubuntu;zone:us_east;rack:42'
  6. © 2015 Mesosphere, Inc. All Rights Reserved. RESOURCE
 OFFERS 12

    Mesos http://mesos.berkeley.edu/mesos_tech_report.pdf
  7. © 2015 Mesosphere, Inc. All Rights Reserved. RESOURCES
 AND 


    STATEFUL
 SERVICES 13 Mesos • prior to Mesos 0.23 no storage primitives existed • issues for stateful services • resource reservation • data persistence
  8. © 2015 Mesosphere, Inc. All Rights Reserved. WORKAROUNDS
 FOR STATEFUL

    SERVICES 14 Mesos resource reservation → static reservations, e.g.:
 mesos-slave --resources=cpu(crate):0.5;mem(crate):2048 • operator-heavy • inflexible • requires Mesos agent restart
  9. © 2015 Mesosphere, Inc. All Rights Reserved. WORKAROUNDS
 FOR STATEFUL

    SERVICES 15 Mesos data persistence → store in out-of-band location, e.g.:
 path.data: /var/crate/data # in crate.yml • no Mesos agent garbage collection • not accounted for by Mesos • setup ahead of time via local volume, NFS-mount of SAN/NAS or DFS such as HDFS, Ceph or Quobyte
  10. © 2015 Mesosphere, Inc. All Rights Reserved. OVERVIEW 17 Dynamic

    Reservation See MESOS-2018 and docs/reservation • solves resource reservation issue • enables re-launch on same agent w/ guaranteed allocation • via framework or operator
  11. © 2015 Mesosphere, Inc. All Rights Reserved. OVERVIEW 19 Persistent

    Volumes See MESOS-1554 and docs/persistent-volume • solves data persistence issue • avoids garbage collection in the sandbox • can only exist on reserved resources (access/security)
  12. © 2015 Mesosphere, Inc. All Rights Reserved. LOCAL OS VS.

    DISTRIBUTED OS 21 http://bitly.com/os-vs-dcos
  13. © 2015 Mesosphere, Inc. All Rights Reserved. DCOS IS A

    DISTRIBUTED OPERATING SYSTEM 22 • kernel (Apache Mesos, written in C++) scales to 10,000 of nodes • fault-tolerant in all components, rolling upgrades throughout • containers first class citizens (LXC, Docker) • local OS per node (+container enabled) • scheduling (long-lived, batch) • service discovery, monitoring, logging, debugging
  14. © 2015 Mesosphere, Inc. All Rights Reserved. BENEFITS 26 DCOS

    • Run stateless services such as Web servers, app servers (via Marathon) and stateful services like Crate, Kafka, HDFS, Cassandra, ArangoDB etc. together on one cluster • Dynamic partitioning of your cluster, depending on your needs (business requirements) • Increased utilization (10% → 80% an more)
  15. © 2015 Mesosphere, Inc. All Rights Reserved. MESOSPHERE IS HIRING,

    WORLDWIDE … San Francisco New York Hamburg https://mesosphere.com/careers/
  16. © 2015 Mesosphere, Inc. All Rights Reserved. Q & A

    28 • @mhausenblas • mhausenblas.info • @mesosphere • mesosphere.io/product Kudos for material in this talk go out to:
 David Greenberg and Joe Stein http://shop.oreilly.com/product/0636920039952.do https://manning.com/books/mesos-in-action