Skip to content
About
Main content

Scheduler self-durability and scale

What limits a scheduler's loop, and why is its metadata database the real single point of failure?

The is itself a system. The repeated failure to treat it as one is why "the went down" is a whole category of incident.

The loop and its cost

The 's loop is: parse definitions → evaluate readiness → write state → hand to executor. The cost is parse time × number of definitions × parse frequency, and that product sets a floor on scheduling latency.

When definitions do I/O at parse time (as in dynamic ), the floor rises with data volume rather than with code volume, and every slows down together. The practical rule is: definition files must be cheap and free of side effects to evaluate. It is the rule most consistently broken by people who have just discovered dynamic generation.

The architecture is forced

Durability forces the architecture:

  1. Run state must survive scheduler restarts, so it lives in a database.
  2. Several schedulers must not launch the same task twice, so they need mutual exclusion.
  3. Mutual exclusion needs a database with transactions and row-level locking, and often a on top (the schedulers choose one that is in charge).

The workload (small writes, high contention, strict transactional need, tiny volume) is a textbook relational workload. This is why essentially every orchestrator ended up with Postgres or an equivalent plus a leader. That agreement is the evidence: the shape of the problem selected the storage engine, not fashion.

What people under-plan

The is a , and it is sized by task count, not data volume. A dynamic fan-out and a chatty interval can make a control plane that serves ten terabytes of pipelines collapse under the write load of its own bookkeeping. And this mechanism's own state is an run history, so it again needs a retention policy and a cleaner.

The scheduler is a small, high-contention transactional system whose database is sized by task count; sets the scheduling latency floor and definitions that do IO raise it for everyone.