Skip to content

The scheduler

The scheduler selects the data-plane owner of a project runtime. It resolves placement from control-plane scheduler capability records, records the chosen runtime identity and fence, and refreshes ownership when the current owner becomes unavailable, overloaded or policy-ineligible.

Placement inputs and result

flowchart LR
  subgraph CP["CONTROL PLANE"]
    direction TB
    WS[("Workspace<br/>organization scope")]
    CAPS[("Scheduler capability records")]
    GATE{{"Healthy, drift-free,<br/>approved namespace"}}
    PICK{{"Deterministic selection<br/>pool then node id"}}
    OWN[("Runtime placement<br/>owner and fence")]
    WS --> GATE
    CAPS --> GATE --> PICK --> OWN
  end
  DP["Selected data-plane node"]
  OWN -->|"project deployment assignment"| DP

Placement is scoped to the organization that owns the project workspace. A candidate must report ready or healthy, must have no drift conflict, and must advertise at least one approved project runtime namespace. Eligible candidates are ordered by dataplane_pool and dataplane_node_id; the first record is selected, which makes the same input set produce the same placement.

Project YAML supplies deployment intent. The control plane derives namespace, service identity, endpoint, runtime instance identity and data-plane owner from the selected scheduler capability record. A project declaration that supplies raw placement fields is refused.

Ownership refresh

The scheduler keeps the current owner while it remains healthy and within the recorded load policy. Ownership transfer is considered when the owner is unavailable, reaches the configured load ratio, or becomes policy-ineligible. The candidate must be healthy and meet the minimum free-capacity ratio.

An admitted transfer advances the fence epoch and updates the runtime workload identity in the same desired-state write. Commands from the previous owner then carry an old fence and are refused. Continuity resumes from the last acknowledged kernel return position.

See Pools, tenant scope, and placement for the operator-visible pool model and Assignment authoring for the sealed envelope sent to the selected node.