Optimizing Large Scale Apache Spark Workloads with Apache Celeborn Remote Shuffle Service on Amazon EMR

The evolution of big data processing has reached a critical juncture where organizations running massive Apache Spark workloads are frequently forced to navigate a precarious balance between operational cost and job reliability. This challenge is particularly acute within the Amazon Web Services (AWS) ecosystem, where the use of Amazon Elastic Compute Cloud (EC2) Spot Instances offers significant savings—often up to 90% compared to On-Demand pricing—but introduces the risk of unexpected node reclamations. For traditional Spark architectures, these interruptions are catastrophic for shuffle operations, which serve as the backbone of data redistribution during complex transformations. By integrating Apache Celeborn as a Remote Shuffle Service (RSS) for Amazon EMR on EKS and Amazon EMR on EC2, enterprises can finally decouple compute from shuffle storage, ensuring that data processing remains resilient even in highly volatile infrastructure environments.
The Architecture of Shuffle Complexity
To understand the necessity of a dedicated shuffle service, one must first examine the inherent limitations of the default Spark shuffle mechanism. In a standard Spark environment, shuffle data is written to the local disks of the executor nodes. While functional for smaller workloads, this model creates three primary points of failure at scale. First, there is the issue of "Shuffle Data Loss." When an executor node is reclaimed—a common occurrence with Spot Instances—all the shuffle data stored on its local disk is lost, forcing the entire Spark job to recompute upstream stages. This leads to cascading delays and increased costs that often negate the savings provided by Spot Instances.
Second, "Disk Contention and I/O Bottlenecks" frequently plague large-scale clusters. Because executors are simultaneously performing compute tasks and managing intensive disk I/O for shuffle writes and reads, the resulting "noisy neighbor" effect can degrade performance. Third, "Highly Skewed Datasets" create uneven disk utilization across the cluster. A single large partition can overwhelm a local disk, leading to "out of disk" errors even when the rest of the cluster has ample capacity. These challenges have historically forced data engineers to over-provision expensive Amazon Elastic Block Store (EBS) volumes or stick to costlier On-Demand instances to ensure job stability.
Apache Celeborn: A Decoupled Approach to Data Shuffling
Apache Celeborn, an open-source project that originated within Alibaba’s large-scale data infrastructure and is now an Apache Software Foundation incubator project, provides a specialized solution to these bottlenecks. It adopts a Leader-Worker-Client architecture designed to externalize the shuffle process. In this paradigm, Spark executors no longer write to local disks; instead, they "push" shuffle data to a dedicated cluster of Celeborn Workers.

The Leader nodes in the Celeborn cluster act as the brain, managing metadata and resource allocation. The Workers are responsible for receiving, caching, and consolidating shuffle blocks, while the Clients are integrated directly into the Spark engine via a pluggable shuffle manager. This push-based model is transformative because it changes the network topology of the shuffle from an $N times M$ connection pattern to a more streamlined and manageable flow. By consolidating partitions on the worker side, Celeborn reduces the number of small random I/O operations, which are notoriously detrimental to performance on both spinning disks and SSDs.
Implementation Chronology: Deploying Celeborn on AWS
The deployment of a robust Remote Shuffle Service requires a multi-layered approach to ensure both performance and observability. The process begins with the establishment of shared infrastructure, including a Virtual Private Cloud (VPC), security groups, and Amazon S3 buckets for persistent logs. Once the foundation is laid, a dedicated Amazon Elastic Kubernetes Service (EKS) cluster is provisioned specifically for the Celeborn service.
The decision to run Celeborn on a separate EKS cluster from the Spark compute environment is a strategic design choice. Spark is typically CPU and memory-intensive, whereas Celeborn is storage and network I/O intensive. By isolating these workloads, administrators can select instance types optimized for each—for example, using R-series instances for Spark and I-series instances with local NVMe storage for Celeborn Workers.
The deployment timeline follows a logical progression:
- Infrastructure Initialization: Setting up the network and security parameters.
- Celeborn Cluster Provisioning: Deploying the Leader and Worker pods via Helm charts.
- Connectivity Layer: Establishing an internal Network Load Balancer (NLB) to facilitate low-latency communication between the EMR executors and the Celeborn cluster.
- Compute Integration: Configuring Amazon EMR (on either EKS or EC2) to point toward the Celeborn endpoints.
- Observability Stack: Implementing the AWS Distro for OpenTelemetry (ADOT) to funnel metrics into Amazon Managed Service for Prometheus and Amazon Managed Grafana.
Technical Configuration and Performance Tuning
Integrating Celeborn into an existing Spark pipeline requires specific configuration changes to the SparkSubmit parameters. To replace the default SortShuffleManager, the parameter spark.shuffle.manager must be set to org.apache.spark.shuffle.celeborn.SparkShuffleManager. Furthermore, the spark.celeborn.master.endpoints must point to the DNS of the internal NLB.

One of the most critical configurations for production stability is the fallback policy. By setting spark.celeborn.client.spark.shuffle.fallback.policy to NEVER, organizations can ensure that the system does not intermittently revert to local shuffle writes, which could cause unpredictable behavior during a Celeborn maintenance window. Additionally, disabling Spark’s built-in external shuffle service (spark.shuffle.service.enabled=false) is mandatory to prevent resource conflicts.
On the server side, the Celeborn Workers are optimized by using hostPath mounts to local NVMe instance stores. While these stores are ephemeral, Celeborn compensates for this by providing Raft-based high availability and per-job data replication. If a Celeborn worker fails, the data is often replicated elsewhere in the cluster, preventing the need for Spark to recompute the stage.
Security and Production Readiness
Transitioning a remote shuffle service from a proof-of-concept to a production environment requires a rigorous focus on security. In the AWS environment, this involves a "defense-in-depth" strategy. At the network layer, the internal NLB ensures that shuffle data never leaves the private subnets of the VPC. Security groups are configured with the principle of least privilege, allowing traffic only from authorized EMR clusters.
For organizations with strict compliance mandates, Celeborn supports Transport Layer Security (TLS) for both its Remote Procedure Call (RPC) and data channels. Furthermore, while the local NVMe instance stores used by workers offer the best performance, they do not support AWS KMS encryption at rest by default. For workloads requiring such encryption, administrators can opt for EBS-backed volumes with encrypted gp3 StorageClasses, though this necessitates a trade-off in I/O throughput.
Another vital production feature is application-level authorization. By enabling Simple Authentication and Security Layer (SASL), Celeborn can ensure that only Spark jobs with the correct credentials can register and write shuffle data. This prevents "tenant interference" in multi-team environments where several departments might share a single large Celeborn cluster.

Observability: Monitoring the Heartbeat of Data Flow
A Remote Shuffle Service is only as good as its visibility. The implementation of an observability stack using ADOT allows data engineers to track real-time metrics such as "Active Shuffles," "Worker Memory Pressure," and "Network Throughput." By integrating these metrics into Amazon Managed Grafana, teams can set up proactive alerts. For instance, an alert can be triggered if the number of "Push Data Failures" exceeds a certain threshold, indicating a potential network bottleneck or a failing worker node.
The "Celeborn Cluster Overview" dashboard provides a holistic view of the system’s health. It allows administrators to see exactly how much shuffle data is being processed per second and how many executors are currently connected. This level of detail is essential for right-sizing the Celeborn cluster and ensuring that the worker-to-executor ratio is optimized for the specific characteristics of the workload.
Broader Implications and Industry Impact
The move toward decoupled shuffle services like Apache Celeborn represents a broader shift in the data engineering landscape toward "FinOps" and infrastructure elasticity. As data volumes continue to grow exponentially, the ability to scale storage and compute independently is no longer a luxury—it is a financial and operational necessity.
Industry analysts suggest that the adoption of Remote Shuffle Services will be a primary driver for the migration of legacy on-premises Hadoop workloads to the cloud. By solving the "Spot Instance Shuffle Problem," Celeborn removes one of the final hurdles for running mission-critical, massive-scale Spark jobs on ephemeral, low-cost infrastructure. This architecture not only reduces the total cost of ownership but also increases the "agility" of data teams, allowing them to spin up thousands of cores for a single job without worrying about the underlying disk stability of the nodes.
In conclusion, the integration of Apache Celeborn with Amazon EMR provides a blueprint for the future of big data processing. It offers a resilient, scalable, and cost-effective alternative to traditional shuffle mechanisms, enabling organizations to harness the full power of the AWS cloud. As the Apache Celeborn community continues to grow and the project matures within the incubator, it is poised to become a standard component of the modern data stack, ensuring that the trade-off between cost and reliability is finally a thing of the past.







