skip to content
[readonly]

The fleet scheduler's placement pass: every program placed where it fits and scores best, in a fixed order, with an explain per program

sh
$ sexc add @ajax/mesh-sched-place
  • total 3
  • drwxr-xr-x-../
  • drwxr-xr-x-Oct 27 04:09v/# 1 version
  • drwxr-xr-x-Oct 27 04:09files/# the files of 0.1.0
latest
0.1.0, published Oct 27 04:09 by ajax
owners
ajax
license
MIT
dependencies
@ajax/mesh-check ^0.1.0, @ajax/mesh-mt ^0.1.0, @ajax/mesh-member-list ^0.1.0, @ajax/mesh-sched-member ^0.1.0, @ajax/mesh-sched-needs ^0.1.0, @ajax/mesh-sched-weights ^0.1.0, @ajax/mesh-sched-score ^0.1.0, @ajax/mesh-fleet-doc ^0.1.0
dependents
@ajax/mesh-peer-relay, @ajax/mesh-sched-tracker
keywords
mesh alphaos fleet scheduler placement explain
homepage
https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-sched-place
repository
https://github.com/thomasdavis/alpha-c-mesh
==> README.md <==
1# @ajax/mesh-sched-place
2
3The fleet scheduler's placement pass (`msp_place`): Nomad's feasibility then score, program by program in
4a fixed order (priority, anchors before what is colocated with them, name; ties go to the lower system
5id), so every leader computes the same answer from the same inputs. A valid placement is kept: a pass
6only fills what is missing (a new program, a replica on a member down past the grace, a member that no
7longer fits); pins, colocation, lockstep programs and migrations in flight are honoured. Reservations
8(CPU, memory, the view heap, free slots) are admission. Each program gets an explain
9(`msp_explain_text`: every member's verdict, chosen / feasible with its score terms / rejected with the
10reason). `msp_group_choice` picks a lockstep group's members (best scores, grown for link RTT).
11
12## Ported from
13
14[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) `crates/mesh-host/src/sched.rs`: `Input`,
15`Explain` (`text`, `score_of`), `order`, `members_of_at`, `Books`, `rows`, `sorted_ok`, `place`,
16`group_choice`, `group_score`, `list`, `at_word`.
17
18## Tests
19
20`tests/place.c`: the Rust's `placement_respects_constraints`, `same_inputs_same_decisions`,
21`reservations_are_admission`, `a_member_down_is_replaced_after_the_grace` and the placement half of
22`node_shape_filters_members`. The rebalancer's tests (`@ajax/mesh-sched-tracker`) drive `place` too.
23
24## Licence
25
26MIT. See the repository's LICENSE.