concept Mesos in category spark

appears as: Mesos
Spark in Action, Second Edition

This is an excerpt from Manning's book Spark in Action, Second Edition.

Basically, the cluster manager allocates resources across applications. However, to run on a cluster, the SparkSession can connect to several types of cluster managers. This might be dictated from your infrastructure, enterprise architects, or know-it-all guru. You may not have a choice here. Chapter 18 discusses more cluster manager options, including YARN, Mesos, and Kubernetes.

Mesos is an Apache project offering a standalone and general-purpose cluster manager, designed independently from its consumers. Mesos can indeed be used by any application willing to access cluster resources. Mesos supports Spark, but also Hadoop, Jenkins, Marathon, and more.

In addition to isolation, Mesos offers other features including dynamic allocation of CPU in coarse-grained mode (fine-grained mode is available but deprecated for Spark as of v2.0).

Although it might not directly impact your Spark application, Mesos also supports Docker containers, making Mesos a more flexible solution for managing most types of workloads. Figure 18.4 illustrates the architecture combining Apache Spark with Apache Mesos.

Figure 18.4 Your application can use a Mesos master to manage the Mesos workers and Spark executor.

To learn more about implementing Mesos for Spark, read the online documentation at http://mng.bz/rPXZ . You can find more about Mesos in Roger Ignazio’s Mesos in Action (Manning, 2016, https://livebook.manning.comhttps://livebook.manning.com/book/mesos-in-action ). Manning also offers numerous resources on Docker, including Docker in Action by Jeff Nickoloff and Stephen Kuenzli (Manning, 2019, https://livebook.manning.com/ book/docker-in-action-second-edition ).

The pros of using Mesos as a cluster manager include the following:

  • Mesos is an independent resource and cluster manager, with its own life cycle and dependencies. Unlike YARN, Mesos is not linked to Hadoop. Mesos has more features, including dynamic allocation or support for Docker containers.
  • The cons of using Mesos as a cluster manager include the following: