Spark standalone cluster manager
| Developer | Apache Software Foundation (Apache Spark project) |
|---|---|
| Initial release | Spark 0.6.0 |
| Latest release | Spark 4.3.0 (2026-10-30) |
| Written in | Scala |
| Type | Cluster manager bundled with Apache Spark |
| License | Apache License 2.0 |
| Website | Spark Standalone Mode |
| Repository | github.com/apache/spark (core/.../deploy) |
| Related | Spark on YARN, Spark on Kubernetes, spark-submit |
The Spark standalone cluster manager is the cluster manager that ships with Apache Spark: a master process and one worker process per node, started with scripts in Spark's sbin directory, that allocate executors to Spark applications without an external resource manager such as YARN or Kubernetes.[1][2] It needs only a Spark distribution on each node, and it offers high availability through standby masters coordinated by Apache ZooKeeper.[1] The standalone cluster manager is one of the three cluster managers that Spark 4.3.0 supports, with Hadoop YARN and Kubernetes.[2]
Is the standalone cluster manager deprecated?
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's REST API by default, and Spark 4.3 changed which environment variables are forwarded to a driver submitted in cluster mode.[2][3] Only individual settings have been deprecated, such as SPARK_WORKER_INSTANCES; the migration guide recommends one worker per node with several executors instead.[3]
History
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.[4] Mesos support was later removed from Spark; see Apache Mesos support in Spark.
How does a standalone cluster work?
A standalone cluster has one active master and any number of workers. 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 spark://HOST:PORT URL, port 7077 by default. Each worker has its own web UI on port 8081.[1]
The cluster is started either by hand (sbin/start-master.sh, then sbin/start-worker.sh spark://HOST:7077 on each node) or with launch scripts that read a conf/workers file of host names and reach each host over SSH. sbin/start-all.sh starts the master and all workers; sbin/start-connect-server.sh starts a Spark Connect server on the local machine.[1] The daemons can also all run on one machine for testing.[1]
Executor placement depends on spark.executor.cores. 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.[1] --total-executor-cores caps the total cores an application takes.[1]
How are applications submitted?
Applications are submitted with spark-submit and --master spark://HOST:7077. In client mode the driver runs in the submitting process; in cluster mode the master launches the driver on one of the workers and the client exits once submission is done.[1] 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.[5]
# Start a one-node cluster and run a PySpark job on it (client mode)
./sbin/start-master.sh
./sbin/start-worker.sh spark://$(hostname):7077
./bin/spark-submit \
--master spark://$(hostname):7077 \
--total-executor-cores 4 \
--executor-memory 2g \
examples/src/main/python/pi.py 100
In cluster mode, --supervise makes the master restart the driver if it exits with a non-zero code.[1] The master also has a REST API for submitting, querying and killing drivers on spark.master.rest.port (default 6066). Since Spark 4.1 the master starts this REST API by default; spark.master.rest.enabled=false restores the earlier behavior.[1][3]
How does high availability work?
By default the standalone master is a single point of failure for scheduling: spark.deploy.recoveryMode is NONE.[1] Spark 4.3.0 offers these recovery modes:[1]
spark.deploy.recoveryMode |
How it works | Use |
|---|---|---|
ZOOKEEPER |
Several masters connect to the same ZooKeeper ensemble (spark.deploy.zookeeper.url, spark.deploy.zookeeper.dir). One is elected leader; if it dies, a standby is elected and recovers the state. |
Production high availability |
FILESYSTEM |
The master writes application and worker registrations to spark.deploy.recoveryDirectory and recovers them when it restarts. |
Single-node recovery after a restart |
ROCKSDB |
Like FILESYSTEM, but the state is kept in RocksDB. |
Single-node recovery |
CUSTOM |
A class given in spark.deploy.recoveryMode.factory provides the persistence. |
Custom stores |
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.[1] Applications and workers list every master in the URL, for example spark://host1:7077,host2:7077, so that they can find the current leader at registration.[5] If several masters run without a correct ZooKeeper configuration, each one considers itself the leader and they schedule independently.[1]
When is the standalone cluster manager used today?
The Spark documentation describes the standalone manager as a simple cluster manager included with Spark that makes it easy to set up a cluster.[2] 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.[1] The standalone manager supports dynamic allocation, and workers started with spark.shuffle.service.enabled=true run the external shuffle service. Because an executor takes all of a worker's cores when spark.executor.cores is not set, the Spark documentation recommends setting it explicitly when dynamic allocation is on.[6]
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.[1]
Standalone compared with YARN and Kubernetes
| Spark standalone | Spark on YARN | Spark on Kubernetes | |
|---|---|---|---|
| Master URL | spark://HOST:7077 |
yarn (address from the Hadoop configuration) |
k8s://HOST:PORT
|
| Resource manager | Spark master and workers | YARN ResourceManager and NodeManagers | Kubernetes API server; driver and executors run in pods |
Default spark.executor.cores
|
All available cores on the worker | 1 | 1 |
Sources: the Spark 4.3.0 standalone, YARN, Kubernetes and submission guides.[1][7][8][5][9][10]
See also
- Spark on YARN
- Spark on Kubernetes
- spark-submit
- Apache Mesos support in Spark
- Executor
- Driver (Apache Spark)
References
- ↑ 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.10 1.11 1.12 1.13 1.14 1.15 1.16 Spark Standalone Mode (Spark 4.3.0). Apache Software Foundation.Retrieved 2026-11-23.
- ↑ 2.0 2.1 2.2 2.3 Cluster Mode Overview (Spark 4.3.0). Apache Software Foundation.Retrieved 2026-11-23.
- ↑ 3.0 3.1 3.2 Migration Guide: Spark Core (Spark 4.3.0). Apache Software Foundation.Retrieved 2026-11-23.
- ↑ Spark Release 0.6.0. Apache Software Foundation.Retrieved 2026-11-23.
- ↑ 5.0 5.1 5.2 Submitting Applications (Spark 4.3.0). Apache Software Foundation.Retrieved 2026-11-23.
- ↑ Job Scheduling (Spark 4.3.0). Apache Software Foundation.Retrieved 2026-11-23.
- ↑ Running Spark on Kubernetes (Spark 4.3.0). Apache Software Foundation.Retrieved 2026-11-23.
- ↑ Running Spark on YARN (Spark 4.3.0). Apache Software Foundation.Retrieved 2026-11-23.
- ↑ SparkSubmitArguments.scala (v4.3.0). Apache Software Foundation.Retrieved 2026-11-23.
- ↑ Spark Configuration (Spark 4.3.0). Apache Software Foundation.Retrieved 2026-11-23.