BlockEdge

Technology and digital life

LinkedIn cuts daily Spark shuffle fetch failures from about 750 to 20 with Apache Celeborn

LinkedIn has moved most of its Apache Spark and Apache Flink workloads to Apache Celeborn, a shared service that stores intermediate data separately from the machines running the jobs. Compared with its previous shuffle implementation, Magnet, LinkedIn reported that daily Spark shuffle fetch failures fell from about 750 to 20, compute costs dropped 10%, and applications ran 14% faster in terms of elapsed time.

Shuffle moves intermediate data between processing stages. LinkedIn’s offline platform runs more than 300,000 Spark jobs a day across thousands of production nodes. Historical backfills added to the shuffle load as LinkedIn began using Flink to process both live and historical data.

Magnet, a push-based shuffle implementation LinkedIn contributed to Spark 3.2, reduced random disk reads by merging small blocks into larger files for each reducer partition. But the shuffle service still competed with compute tasks for CPU, memory, disk I/O and network capacity. With Celeborn, map tasks push their output to dedicated workers that merge and store the partitions. Reducers fetch data directly from those workers, so storage can scale independently of compute and need not depend on how long individual executors run.

Keeping shuffle data available

LinkedIn senior engineer Aravind Patnam said operating Celeborn reliably across thousands of nodes required substantial engineering beyond the upstream project. LinkedIn deployed a five-node control plane across availability zones, using Apache Ratis to implement Raft-based metadata replication, leader election and failover. It also made replication decisions network-aware and connected Celeborn to its host-health system. The scheduler gives lower priority to workers approaching maintenance and excludes unhealthy ones. LinkedIn said these changes cut task failures during infrastructure faults to one-twentieth of their previous level.

LinkedIn cuts daily Spark shuffle fetch failures from about 750 to 20 with Apache Celeborn

Reducing shuffle time and cost

LinkedIn reported that moving shuffle storage to NVMe SSDs cut overall shuffle duration by 40%. Switching compression from LZ4 to Zstandard reduced the required shuffle worker fleet by about 35%. LinkedIn also equipped workers with 100 Gbps network interfaces, while JVM and data-plane changes cut slot selection time to one-sixth of its previous level. Across the cluster, shuffle cost per task fell by nearly 90%, and the share of executor time spent waiting on shuffle operations fell roughly 10% to 15% from its peak.

On the unified Flink platform, LinkedIn said historical backfills process hundreds of millions of events per hour, bringing multi-job workloads that once took days down to hours. Thousands of pipelines now use Flink for both nearline processing and historical corrections instead of maintaining parallel Spark implementations. LinkedIn is exploring caching and faster upgrades to upstream Celeborn releases while continuing to contribute to the project.