1. Apache Spark 3.x Official Documentation
"Submitting Applications":
Section: "Deploy Mode"
Content: The documentation specifies that for client mode
"the driver is launched in the same process as the client that submits the application." In contrast
for cluster mode
"the driver is launched on one of the worker nodes inside the cluster... This is useful for jobs that are launched from a gateway machine that is far from the worker machines." This directly supports moving the driver to a more powerful
co-located machine within the cluster to resolve resource constraints.
2. Karau
H.
Konwinski
A.
Wendell
P.
& Zaharia
M. (2020). Learning Spark: Lightning-Fast Data Analytics (2nd ed.). O'Reilly Media.
Chapter 17: Deploying Apache Spark
Section: "The spark-submit Command":
Content: The authors (who include the original creators of Spark and Databricks employees) explain that cluster mode is preferred for production jobs. They state
"In cluster mode
the Spark driver runs on one of the worker nodes of the cluster... The driver program is now running on a machine that is on the same network as the worker nodes
so it can communicate with them quickly." This highlights the performance and resource advantages of running the driver within the cluster.
3. UC Berkeley
Foundations of Data Science (Data 100)
"Lecture 20: Spark":
Section: "Spark Architecture: Cluster Manager"
Content: University course materials often explain the trade-offs. For client mode
they note it's good for interactive development but can be a bottleneck if the driver requires significant resources. For cluster mode
they emphasize its suitability for production
as the driver runs on a dedicated machine within the cluster
managed by the cluster manager
providing better resource allocation and fault tolerance.