Skip to content
About
Main content

The four architectures

How does each scheduler architecture protect cluster state, and why do two random probes go so far?

ArchitectureConcurrency-control analogueWhat it gives up
Monolithic (one scheduler, global view)single lockscheduler ; extensibility
Two-level offers (a resource manager offers resources to per-framework schedulers)pessimistic lockinga global view: frameworks see only a subset, so cross-framework and packing are impossible, and gangs must hoard offers
Shared-state optimistic (many schedulers work on a copy of the cluster state, commit with CAS)MVCC + CAS retrywasted work under conflict. The conflict rate rises with gang size and with resource scarcity
Distributed sampling (each scheduler probes a few random machines)no coordinationglobal constraints, fairness and gangs. It buys near-optimal placement from the power of two choices

The surprise: sampling needs only two probes

Sampling works for a counterintuitive reason: probing two random nodes and taking the one with the shorter gives an exponentially better than probing one, and probing all of them barely improves on two (the power of two choices). That is why a scheduler can skip coordination entirely and still place well: it gives up only what needs the global view (constraints, fairness, gangs).

Contested, honestly: does the monolithic scheduler really not scale?

The "monolithic schedulers do not scale" claim is more cited than demonstrated. Google's monolithic Borg scheduler ran production clusters at scale for years. The shared-state work was motivated as much by extensibility (letting different teams add scheduling policies without editing one codebase) as by throughput.

Treat "centralized schedulers do not scale" as organizational reality more than physical law. Lena should measure her own decisions-per-second need before she redesigns anything.

The cluster state is a shared object. Pick pessimistic, optimistic or sampled, and pay the same prices you would pay in a database.