← Questions

Design a job scheduler for ETL pipelines

0
MicrosoftSystem designLast asked Feb 2026

A system design interview question asked in Microsoft's system design round, last asked Feb 2026. It tests scheduling, etl and workflows.

Design a system that runs ETL jobs for many teams, on schedules and as dependency graphs: a pipeline is a set of tasks where some tasks wait for others. The system defines pipelines, triggers them, hands tasks to workers, retries failures, runs backfills over past dates, and shows what is running and why something failed, without ever running the same task for the same date twice at once.

Requirements

  • Functional: define pipelines as DAGs with schedules (cron) and event triggers; run tasks on a worker fleet; retry with back-off; backfill a date range; pause, cancel and re-run; show history, logs and alerts.
  • Non-functional: thousands of pipelines and tens of thousands of task runs a day; no duplicate concurrent runs of a task instance; survives scheduler and worker crashes; fair across tenants; metadata changes are audited.

Clarifying questions

  • How many pipelines and task runs per day, and how long do tasks run?
  • Do tasks run on our workers, or do we call external engines (Spark, SQL warehouses)?
  • What guarantees do task authors get: at-least-once with idempotent tasks, or exactly-once?
  • How are secrets and credentials passed to tasks?
  • Are there priorities or quotas per team?

What a strong answer covers

  • A metadata store for pipeline definitions, versions, task instances (pipeline, task, logical date) and their states, as the source of truth.
  • A scheduler that turns schedules and triggers into pipeline runs and marks tasks ready when dependencies succeed; leader election or sharding by pipeline so two schedulers do not create the same run.
  • A queue and workers with leases and heartbeats: a task instance is claimed with a conditional update, and an expired lease makes it retryable, so crashes do not double-run work.
  • Retries, timeouts, and idempotent task design (write to a partition, then swap) so at-least-once delivery is safe.
  • Backfills as many runs over logical dates with concurrency limits, so they do not starve daily runs.
  • Observability: run history, logs, SLA alerts, lineage between datasets; multi-tenant quotas and isolation.

Follow-ups

  • A worker loses its network but keeps running the task while another worker retries it. How do you prevent two writers?
  • A pipeline definition changes while yesterday's run is still going. Which version does each task use?
  • How would you trigger pipelines when upstream data lands, instead of on a clock?
  • How do you scale the scheduler itself past one machine?

Where it's asked

What it tests

scheduling · etl · workflows

Your canvas
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing