Batch job barrier coordinator
Your task
Design a barrier / fan-in-fan-out compute coordinator for a batch analytics job: a coordinator splits work into ~10,000 parallel tasks across a worker fleet, then a downstream aggregation stage must start only after ALL tasks complete (a barrier). Constraints: workers are preemptible and can die, the job must finish despite stragglers, and the barrier must not release early or hang forever. Describe how tasks are dispatched and tracked, how completion is detected across concurrent workers, and how stragglers/failures are handled.
It covers
- Barrier
- Fan out fan in
- Compute