moonzero · control plane v0.15.0 · 49 packages · 4 targets · Apache-2.0 lab GitHub

LAB

Two decisions you can move

The picker and the bucket are the two places a service says no. Move the inputs and watch where the line falls.

Power of two choices

src/balance/p2c.mbt — load = trunc(sqrt(lag_ms · 10⁶ + 1)) · (inflight + 1)

Token bucket

src/limit/ratelimit.mbt — holds up to burst, refills at rate a second, one token a request

Both benches call the library named above, compiled to wasm and loaded by this page: moving a control runs the same code a service runs. The module is built from src/examples/browser by the documentation workflow.