<?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=External_shuffle_service</id>
	<title>External shuffle service - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://openlakehouse.io/w/index.php?action=history&amp;feed=atom&amp;title=External_shuffle_service"/>
	<link rel="alternate" type="text/html" href="https://openlakehouse.io/w/index.php?title=External_shuffle_service&amp;action=history"/>
	<updated>2026-12-06T00:08:15Z</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=External_shuffle_service&amp;diff=148&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=External_shuffle_service&amp;diff=148&amp;oldid=prev"/>
		<updated>2026-11-25T00:52:41Z</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 concept&lt;br /&gt;
| name            = External shuffle service&lt;br /&gt;
| also_known_as   = ESS, Spark shuffle service, &amp;lt;code&amp;gt;spark_shuffle&amp;lt;/code&amp;gt; (YARN auxiliary service name)&lt;br /&gt;
| field           = Distributed data processing&lt;br /&gt;
| introduced      = Apache Spark 1.2&lt;br /&gt;
| key_parts       = Long-running per-node process, shuffle file server, state store (RocksDB by default)&lt;br /&gt;
| implementations = [[Apache Spark]] standalone workers and YARN NodeManagers; not supported on Kubernetes&lt;br /&gt;
| related         = [[Shuffle]], [[Dynamic allocation]], [[Push-based shuffle]], [[Executor]]&lt;br /&gt;
}}&lt;br /&gt;
{{Verified|2026-11-23|the v4.3.0 tag of apache/spark (docs/job-scheduling.md, docs/configuration.md, docs/running-on-yarn.md, docs/spark-standalone.md), the Apache Celeborn and Apache Uniffle project sites}}&lt;br /&gt;
&lt;br /&gt;
In [[Apache Spark]], the &amp;#039;&amp;#039;&amp;#039;external shuffle service&amp;#039;&amp;#039;&amp;#039; (ESS) is a long-running process on each node of a cluster that serves the [[shuffle]] files written by [[executor]]s, so those files stay available after the executor that wrote them has been removed or has failed. It runs independently of Spark applications and their executors, and was introduced in Spark 1.2.&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#graceful-decommission-of-executors |title=Job Scheduling: Graceful Decommission of Executors (Spark 4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt; It is enabled with &amp;lt;code&amp;gt;spark.shuffle.service.enabled&amp;lt;/code&amp;gt; (default false) and listens on port 7337 by default (&amp;lt;code&amp;gt;spark.shuffle.service.port&amp;lt;/code&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;
== Why does the external shuffle service exist? ==&lt;br /&gt;
In a shuffle, each executor writes its map output to local disk and then acts as the server for those files when other executors fetch them. If the executor goes away before the next stage has read the files, the map tasks that produced them have to run again.&amp;lt;ref name=&amp;quot;jobsched&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This matters most with [[dynamic allocation]], which removes idle executors while the application is still running; a straggler can keep a shuffle open after the executors that wrote it are idle.&amp;lt;ref name=&amp;quot;jobsched&amp;quot; /&amp;gt; With the ESS enabled, executors fetch shuffle files from the service instead of from each other, so shuffle output can still be served after the executor&amp;#039;s lifetime. The service also lets shuffle fetches continue if an executor fails.&amp;lt;ref name=&amp;quot;jobsched&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ESS can also serve RDD blocks persisted on disk, when &amp;lt;code&amp;gt;spark.shuffle.service.fetch.rdd.enabled&amp;lt;/code&amp;gt; is true (default false). With dynamic allocation, executors that hold only disk-persisted blocks are then treated as idle and can be released.&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Where does the external shuffle service run? ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Cluster manager !! Where the ESS runs !! How to enable it&lt;br /&gt;
|-&lt;br /&gt;
| Standalone&lt;br /&gt;
| Inside each Spark worker&lt;br /&gt;
| Start the workers with &amp;lt;code&amp;gt;spark.shuffle.service.enabled=true&amp;lt;/code&amp;gt;&amp;lt;ref name=&amp;quot;jobsched&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| YARN&lt;br /&gt;
| As a YARN auxiliary service inside each NodeManager, class &amp;lt;code&amp;gt;org.apache.spark.network.yarn.YarnShuffleService&amp;lt;/code&amp;gt;&lt;br /&gt;
| Add &amp;lt;code&amp;gt;spark_shuffle&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;yarn.nodemanager.aux-services&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;yarn-site.xml&amp;lt;/code&amp;gt;, put &amp;lt;code&amp;gt;spark-&amp;amp;lt;version&amp;amp;gt;-yarn-shuffle.jar&amp;lt;/code&amp;gt; on the NodeManager classpath, raise the NodeManager heap (&amp;lt;code&amp;gt;YARN_HEAPSIZE&amp;lt;/code&amp;gt;, 1000 by default) and restart the NodeManagers&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#configuring-the-external-shuffle-service |title=Running Spark on YARN: Configuring the External Shuffle Service (Spark 4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Kubernetes&lt;br /&gt;
| Not supported&lt;br /&gt;
| Use an alternative (below)&amp;lt;ref name=&amp;quot;jobsched&amp;quot; /&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On YARN, a cluster can run more than one version of the shuffle service at once in isolated classloaders, on YARN 2.9.0 or later, because the shuffle service is not always compatible with other Spark versions.&amp;lt;ref name=&amp;quot;yarn&amp;quot; /&amp;gt; On both standalone and YARN, the service can store its state on local disk so that it survives a restart of the service; the state store uses RocksDB by default, and LevelDB is deprecated.&amp;lt;ref name=&amp;quot;yarn&amp;quot; /&amp;gt;&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;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- yarn-site.xml on every NodeManager --&amp;gt;&lt;br /&gt;
&amp;lt;property&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;yarn.nodemanager.aux-services&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;value&amp;gt;mapreduce_shuffle,spark_shuffle&amp;lt;/value&amp;gt;&lt;br /&gt;
&amp;lt;/property&amp;gt;&lt;br /&gt;
&amp;lt;property&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;yarn.nodemanager.aux-services.spark_shuffle.class&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;value&amp;gt;org.apache.spark.network.yarn.YarnShuffleService&amp;lt;/value&amp;gt;&lt;br /&gt;
&amp;lt;/property&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The application then sets &amp;lt;code&amp;gt;spark.shuffle.service.enabled=true&amp;lt;/code&amp;gt;.&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What are the alternatives on Kubernetes? ==&lt;br /&gt;
Spark on Kubernetes does not support the external shuffle service.&amp;lt;ref name=&amp;quot;jobsched&amp;quot; /&amp;gt; Spark itself offers three other ways to keep shuffle data when executors are removed:&amp;lt;ref name=&amp;quot;jobsched&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Shuffle tracking&amp;#039;&amp;#039;&amp;#039; (&amp;lt;code&amp;gt;spark.dynamicAllocation.shuffleTracking.enabled&amp;lt;/code&amp;gt;, default true): Spark keeps alive the executors that store shuffle data for active jobs.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Decommissioning with shuffle block migration&amp;#039;&amp;#039;&amp;#039; (&amp;lt;code&amp;gt;spark.decommission.enabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;spark.storage.decommission.shuffleBlocks.enabled&amp;lt;/code&amp;gt;): an executor copies its shuffle blocks to other executors before it is removed, optionally to a fallback storage path such as an S3 bucket.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;A shuffle storage plugin&amp;#039;&amp;#039;&amp;#039; (&amp;lt;code&amp;gt;spark.shuffle.sort.io.plugin.class&amp;lt;/code&amp;gt;, experimental): a custom &amp;lt;code&amp;gt;ShuffleDataIO&amp;lt;/code&amp;gt; stores shuffle data in reliable storage.&lt;br /&gt;
&lt;br /&gt;
Separate open source &amp;#039;&amp;#039;&amp;#039;remote shuffle services&amp;#039;&amp;#039;&amp;#039; take the shuffle data out of executors altogether. [[Apache Celeborn]] describes itself as an intermediate data service for compute engines, for shuffle and spilled data, with Spark integration and a Kubernetes deployment guide.&amp;lt;ref name=&amp;quot;celeborn&amp;quot;&amp;gt;{{Cite web |url=https://celeborn.apache.org/ |title=Apache Celeborn |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt; Apache Uniffle is a remote shuffle service that lets Spark applications store shuffle data on remote shuffle servers, with a Kubernetes operator.&amp;lt;ref name=&amp;quot;uniffle&amp;quot;&amp;gt;{{Cite web |url=https://uniffle.apache.org/docs/intro |title=Apache Uniffle: Intro |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! !! External shuffle service !! Shuffle tracking !! Decommission migration !! Remote shuffle service&lt;br /&gt;
|-&lt;br /&gt;
! Extra process&lt;br /&gt;
| One per node&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
| Separate cluster&lt;br /&gt;
|-&lt;br /&gt;
! Kubernetes&lt;br /&gt;
| Not supported&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
! Executors can be released while their shuffle is in use&lt;br /&gt;
| Yes&lt;br /&gt;
| No (unless &amp;lt;code&amp;gt;shuffleTracking.timeout&amp;lt;/code&amp;gt; is set)&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&lt;br /&gt;
| Yes, after migration&lt;br /&gt;
| Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Shuffle]]&lt;br /&gt;
* [[Dynamic allocation]]&lt;br /&gt;
* [[Push-based shuffle]]&lt;br /&gt;
* [[Executor]]&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>