Spark Cluster Sizing for a 100 GB Workload
Size and explain a resilient Spark cluster for a finite 100 GB batch job, from input partitions through shuffle and atomic output.
Problem statement
For this exercise, assume you must size and explain a Spark cluster that processes one immutable 100 GB snapshot stored as splittable columnar files. Treat 100 GB as bytes read from storage before in-memory expansion; active records may use up to twice their stored bytes.
The job scans and filters the input, performs one keyed aggregation that causes a full shuffle, and writes at most 10 GB of output to durable object storage. Run one job at a time and target completion within 30 minutes under normal conditions.
Size the cluster in homogeneous 8-vCPU, 32-GB worker units with local shuffle storage; keep coordinator resources separate and reserve operating-system and runtime headroom.
Show the number of worker nodes, usable task slots, input and shuffle partitions, expected task waves, stage boundaries, and the detailed execution flow from submission to committed output.
A single worker may fail once during execution; retries must not corrupt or partially publish the result, and the recovered run should finish within 45 minutes. Preserve this invariant: readers see either the prior complete output or the new complete output, never a mixture.
Keep streaming, multiple concurrent jobs, GPU execution, multi-region operation, and implementation of Spark itself outside scope.
What to build
- A data engineer can submit a batch job bound to one immutable input snapshot and output target and receive a durable job identifier.
- The cluster plans and executes scan, shuffle, aggregation, and write work as observable stages, partitions, tasks, and attempts.
- The job publishes exactly one complete output only after all required work succeeds, without exposing partial retry output.
- The engineer can inspect resource use and task progress, and the run can recover from one worker failure within the stated recovery target.
At scale
- For this exercise, process one immutable 100 GB input snapshot from splittable columnar files; active records may expand to twice their stored bytes, the aggregation causes a full shuffle, and the final output is at most 10 GB.
- For this exercise, run one job at a time and target normal completion within 30 minutes.
- For this exercise, use homogeneous 8-vCPU, 32-GB worker units with local shuffle storage and reserve capacity for the runtime and operating system.
- For this exercise, one worker may fail during a run; preserve complete-output visibility and target recovered completion within 45 minutes.