<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://openlakehouse.io/w/index.php?action=history&amp;feed=atom&amp;title=Spark_standalone_cluster_manager</id>
	<title>Spark standalone cluster manager - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://openlakehouse.io/w/index.php?action=history&amp;feed=atom&amp;title=Spark_standalone_cluster_manager"/>
	<link rel="alternate" type="text/html" href="https://openlakehouse.io/w/index.php?title=Spark_standalone_cluster_manager&amp;action=history"/>
	<updated>2026-12-06T00:13:44Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://openlakehouse.io/w/index.php?title=Spark_standalone_cluster_manager&amp;diff=199&amp;oldid=prev</id>
		<title>Open Lakehouse Wiki sync: Sync from open-lakehouse/wiki@7c9abaa</title>
		<link rel="alternate" type="text/html" href="https://openlakehouse.io/w/index.php?title=Spark_standalone_cluster_manager&amp;diff=199&amp;oldid=prev"/>
		<updated>2026-11-25T00:52:57Z</updated>

		<summary type="html">&lt;p&gt;Sync from open-lakehouse/wiki@7c9abaa&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Infobox software&lt;br /&gt;
| name                = Spark standalone cluster manager&lt;br /&gt;
| developer           = [[Apache Software Foundation]] ([[Apache Spark]] project)&lt;br /&gt;
| initial_release     = Spark 0.6.0&lt;br /&gt;
| latest_release      = Spark 4.3.0&lt;br /&gt;
| latest_release_date = 2026-10-30&lt;br /&gt;
| written_in          = Scala&lt;br /&gt;
| type                = Cluster manager bundled with Apache Spark&lt;br /&gt;
| license             = Apache License 2.0&lt;br /&gt;
| website             = [https://spark.apache.org/docs/4.3.0/spark-standalone.html Spark Standalone Mode]&lt;br /&gt;
| repo                = [https://github.com/apache/spark/tree/v4.3.0/core/src/main/scala/org/apache/spark/deploy github.com/apache/spark (core/.../deploy)]&lt;br /&gt;
| related             = [[Spark on YARN]], [[Spark on Kubernetes]], [[Spark-submit|spark-submit]]&lt;br /&gt;
}}&lt;br /&gt;
{{Verified|2026-11-23|the v4.3.0 tag of apache/spark (docs/spark-standalone.md, docs/cluster-overview.md, docs/submitting-applications.md, docs/core-migration-guide.md, docs/job-scheduling.md) and the Spark 0.6.0 release notes}}&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Spark standalone cluster manager&amp;#039;&amp;#039;&amp;#039; is the cluster manager that ships with [[Apache Spark]]: a master process and one worker process per node, started with scripts in Spark&amp;#039;s &amp;lt;code&amp;gt;sbin&amp;lt;/code&amp;gt; directory, that allocate executors to Spark applications without an external resource manager such as YARN or Kubernetes.&amp;lt;ref name=&amp;quot;standalone&amp;quot;&amp;gt;{{Cite web |url=https://spark.apache.org/docs/4.3.0/spark-standalone.html |title=Spark Standalone Mode (Spark 4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;overview&amp;quot;&amp;gt;{{Cite web |url=https://spark.apache.org/docs/4.3.0/cluster-overview.html |title=Cluster Mode Overview (Spark 4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt; It needs only a Spark distribution on each node, and it offers high availability through standby masters coordinated by Apache ZooKeeper.&amp;lt;ref name=&amp;quot;standalone&amp;quot; /&amp;gt; The standalone cluster manager is one of the three cluster managers that Spark 4.3.0 supports, with [[Spark on YARN|Hadoop YARN]] and [[Spark on Kubernetes|Kubernetes]].&amp;lt;ref name=&amp;quot;overview&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Is the standalone cluster manager deprecated? ==&lt;br /&gt;
No. The standalone cluster manager is not deprecated in Spark 4.3.0. The Spark 4.3.0 cluster mode overview lists it as a supported cluster manager, and recent releases still change it: Spark 4.1 turned on the master&amp;#039;s REST API by default, and Spark 4.3 changed which environment variables are forwarded to a driver submitted in cluster mode.&amp;lt;ref name=&amp;quot;overview&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;coremig&amp;quot;&amp;gt;{{Cite web |url=https://spark.apache.org/docs/4.3.0/core-migration-guide.html |title=Migration Guide: Spark Core (Spark 4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt; Only individual settings have been deprecated, such as &amp;lt;code&amp;gt;SPARK_WORKER_INSTANCES&amp;lt;/code&amp;gt;; the migration guide recommends one worker per node with several executors instead.&amp;lt;ref name=&amp;quot;coremig&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
Spark 0.6.0 added the standalone deploy mode, so that a cluster could be launched with only Java and Spark installed on each machine. At that time Spark otherwise ran on Apache Mesos.&amp;lt;ref&amp;gt;{{Cite web |url=https://spark.apache.org/releases/spark-release-0-6-0.html |title=Spark Release 0.6.0 |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt; Mesos support was later removed from Spark; see [[Apache Mesos support in Spark]].&lt;br /&gt;
&lt;br /&gt;
== How does a standalone cluster work? ==&lt;br /&gt;
A standalone cluster has one active &amp;#039;&amp;#039;&amp;#039;master&amp;#039;&amp;#039;&amp;#039; and any number of &amp;#039;&amp;#039;&amp;#039;workers&amp;#039;&amp;#039;&amp;#039;. The master tracks the workers and their free cores and memory, and launches executors on them for each application. Its web UI is on port 8080 by default, and it accepts applications at a &amp;lt;code&amp;gt;spark://HOST:PORT&amp;lt;/code&amp;gt; URL, port 7077 by default. Each worker has its own web UI on port 8081.&amp;lt;ref name=&amp;quot;standalone&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cluster is started either by hand (&amp;lt;code&amp;gt;sbin/start-master.sh&amp;lt;/code&amp;gt;, then &amp;lt;code&amp;gt;sbin/start-worker.sh spark://HOST:7077&amp;lt;/code&amp;gt; on each node) or with launch scripts that read a &amp;lt;code&amp;gt;conf/workers&amp;lt;/code&amp;gt; file of host names and reach each host over SSH. &amp;lt;code&amp;gt;sbin/start-all.sh&amp;lt;/code&amp;gt; starts the master and all workers; &amp;lt;code&amp;gt;sbin/start-connect-server.sh&amp;lt;/code&amp;gt; starts a [[Spark Connect]] server on the local machine.&amp;lt;ref name=&amp;quot;standalone&amp;quot; /&amp;gt; The daemons can also all run on one machine for testing.&amp;lt;ref name=&amp;quot;standalone&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executor placement depends on &amp;lt;code&amp;gt;spark.executor.cores&amp;lt;/code&amp;gt;. When it is set, the master can start several executors of one application on the same worker if the worker has enough cores and memory. When it is not set, each executor takes all available cores on its worker, so one application gets at most one executor per worker in each scheduling round.&amp;lt;ref name=&amp;quot;standalone&amp;quot; /&amp;gt; &amp;lt;code&amp;gt;--total-executor-cores&amp;lt;/code&amp;gt; caps the total cores an application takes.&amp;lt;ref name=&amp;quot;standalone&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How are applications submitted? ==&lt;br /&gt;
Applications are submitted with [[Spark-submit|spark-submit]] and &amp;lt;code&amp;gt;--master spark://HOST:7077&amp;lt;/code&amp;gt;. In &amp;lt;code&amp;gt;client&amp;lt;/code&amp;gt; mode the driver runs in the submitting process; in &amp;lt;code&amp;gt;cluster&amp;lt;/code&amp;gt; mode the master launches the driver on one of the workers and the client exits once submission is done.&amp;lt;ref name=&amp;quot;standalone&amp;quot; /&amp;gt; The Spark 4.3.0 documentation states that standalone cluster mode is not supported for Python applications, so PySpark jobs on a standalone cluster run in client mode.&amp;lt;ref name=&amp;quot;submit&amp;quot;&amp;gt;{{Cite web |url=https://spark.apache.org/docs/4.3.0/submitting-applications.html |title=Submitting Applications (Spark 4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Start a one-node cluster and run a PySpark job on it (client mode)&lt;br /&gt;
./sbin/start-master.sh&lt;br /&gt;
./sbin/start-worker.sh spark://$(hostname):7077&lt;br /&gt;
./bin/spark-submit \&lt;br /&gt;
  --master spark://$(hostname):7077 \&lt;br /&gt;
  --total-executor-cores 4 \&lt;br /&gt;
  --executor-memory 2g \&lt;br /&gt;
  examples/src/main/python/pi.py 100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In cluster mode, &amp;lt;code&amp;gt;--supervise&amp;lt;/code&amp;gt; makes the master restart the driver if it exits with a non-zero code.&amp;lt;ref name=&amp;quot;standalone&amp;quot; /&amp;gt; The master also has a REST API for submitting, querying and killing drivers on &amp;lt;code&amp;gt;spark.master.rest.port&amp;lt;/code&amp;gt; (default 6066). Since Spark 4.1 the master starts this REST API by default; &amp;lt;code&amp;gt;spark.master.rest.enabled=false&amp;lt;/code&amp;gt; restores the earlier behavior.&amp;lt;ref name=&amp;quot;standalone&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;coremig&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How does high availability work? ==&lt;br /&gt;
By default the standalone master is a single point of failure for scheduling: &amp;lt;code&amp;gt;spark.deploy.recoveryMode&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt;.&amp;lt;ref name=&amp;quot;standalone&amp;quot; /&amp;gt; Spark 4.3.0 offers these recovery modes:&amp;lt;ref name=&amp;quot;standalone&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! &amp;lt;code&amp;gt;spark.deploy.recoveryMode&amp;lt;/code&amp;gt; !! How it works !! Use&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ZOOKEEPER&amp;lt;/code&amp;gt; || Several masters connect to the same ZooKeeper ensemble (&amp;lt;code&amp;gt;spark.deploy.zookeeper.url&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;spark.deploy.zookeeper.dir&amp;lt;/code&amp;gt;). One is elected leader; if it dies, a standby is elected and recovers the state. || Production high availability&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;FILESYSTEM&amp;lt;/code&amp;gt; || The master writes application and worker registrations to &amp;lt;code&amp;gt;spark.deploy.recoveryDirectory&amp;lt;/code&amp;gt; and recovers them when it restarts. || Single-node recovery after a restart&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ROCKSDB&amp;lt;/code&amp;gt; || Like &amp;lt;code&amp;gt;FILESYSTEM&amp;lt;/code&amp;gt;, but the state is kept in RocksDB. || Single-node recovery&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;CUSTOM&amp;lt;/code&amp;gt; || A class given in &amp;lt;code&amp;gt;spark.deploy.recoveryMode.factory&amp;lt;/code&amp;gt; provides the persistence. || Custom stores&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
With ZooKeeper, failover from the time the leader goes down takes between one and two minutes according to the Spark documentation, and it affects only the scheduling of new applications; applications already running continue.&amp;lt;ref name=&amp;quot;standalone&amp;quot; /&amp;gt; Applications and workers list every master in the URL, for example &amp;lt;code&amp;gt;spark://host1:7077,host2:7077&amp;lt;/code&amp;gt;, so that they can find the current leader at registration.&amp;lt;ref name=&amp;quot;submit&amp;quot; /&amp;gt; If several masters run without a correct ZooKeeper configuration, each one considers itself the leader and they schedule independently.&amp;lt;ref name=&amp;quot;standalone&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== When is the standalone cluster manager used today? ==&lt;br /&gt;
The Spark documentation describes the standalone manager as a simple cluster manager included with Spark that makes it easy to set up a cluster.&amp;lt;ref name=&amp;quot;overview&amp;quot; /&amp;gt; It fits cases where Spark is the only workload on a set of machines and no YARN or Kubernetes cluster is available, single-machine test clusters, and hosting a [[Spark Connect]] server started with the bundled launch scripts.&amp;lt;ref name=&amp;quot;standalone&amp;quot; /&amp;gt; The standalone manager supports dynamic allocation, and workers started with &amp;lt;code&amp;gt;spark.shuffle.service.enabled=true&amp;lt;/code&amp;gt; run the external shuffle service. Because an executor takes all of a worker&amp;#039;s cores when &amp;lt;code&amp;gt;spark.executor.cores&amp;lt;/code&amp;gt; is not set, the Spark documentation recommends setting it explicitly when dynamic allocation is on.&amp;lt;ref name=&amp;quot;jobsched&amp;quot;&amp;gt;{{Cite web |url=https://spark.apache.org/docs/4.3.0/job-scheduling.html |title=Job Scheduling (Spark 4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Security is off by default. The Spark documentation warns that a standalone cluster open to an untrusted network must have authentication configured, and notes that the standalone manager lacks the fine-grained access control of other resource managers.&amp;lt;ref name=&amp;quot;standalone&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Standalone compared with YARN and Kubernetes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! !! Spark standalone !! [[Spark on YARN]] !! [[Spark on Kubernetes]]&lt;br /&gt;
|-&lt;br /&gt;
! Master URL&lt;br /&gt;
| &amp;lt;code&amp;gt;spark://HOST:7077&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;yarn&amp;lt;/code&amp;gt; (address from the Hadoop configuration) || &amp;lt;code&amp;gt;k8s://HOST:PORT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Resource manager&lt;br /&gt;
| Spark master and workers || YARN ResourceManager and NodeManagers || Kubernetes API server; driver and executors run in pods&lt;br /&gt;
|-&lt;br /&gt;
! Default &amp;lt;code&amp;gt;spark.executor.cores&amp;lt;/code&amp;gt;&lt;br /&gt;
| All available cores on the worker || 1 || 1&lt;br /&gt;
|}&lt;br /&gt;
Sources: the Spark 4.3.0 standalone, YARN, Kubernetes and submission guides.&amp;lt;ref name=&amp;quot;standalone&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;k8s&amp;quot;&amp;gt;{{Cite web |url=https://spark.apache.org/docs/4.3.0/running-on-kubernetes.html |title=Running Spark on Kubernetes (Spark 4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;yarn&amp;quot;&amp;gt;{{Cite web |url=https://spark.apache.org/docs/4.3.0/running-on-yarn.html |title=Running Spark on YARN (Spark 4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;submit&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;ssargs&amp;quot;&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v4.3.0/core/src/main/scala/org/apache/spark/deploy/SparkSubmitArguments.scala |title=SparkSubmitArguments.scala (v4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;config&amp;quot;&amp;gt;{{Cite web |url=https://spark.apache.org/docs/4.3.0/configuration.html |title=Spark Configuration (Spark 4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Spark on YARN]]&lt;br /&gt;
* [[Spark on Kubernetes]]&lt;br /&gt;
* [[Spark-submit|spark-submit]]&lt;br /&gt;
* [[Apache Mesos support in Spark]]&lt;br /&gt;
* [[Executor]]&lt;br /&gt;
* [[Driver (Apache Spark)]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Navbox open lakehouse}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Concepts]]&lt;br /&gt;
[[Category:Glossary terms]]&lt;br /&gt;
[[Category:Apache Spark]]&lt;/div&gt;</summary>
		<author><name>Open Lakehouse Wiki sync</name></author>
	</entry>
</feed>