Expand description
Adaptive client-side load balancing for changing service fleets, with bounded backpressure.
A client may need to balance work across endpoints whose capacities and latencies differ or change as the fleet scales. Static rate and concurrency limits cannot adapt to those differences, while unbounded local queues hide overload. Loadpace learns an operating point for each endpoint, paces work toward it, predicts completion cost for endpoint selection, and stops local admission when the bounded scheduling horizon is full.
This crate contains the runtime-independent controller and deterministic
simulator. Framework integrations live in separate crates such as
loadpace-tower and loadpace-rama.
Structs§
- Controller
Snapshot - A point-in-time view useful for metrics, tests, and P2C load prediction.
- Dispatch
Reservation - A request that has reserved a slot in the endpoint’s virtual queue.
- Endpoint
Config - Configuration for one adaptive endpoint.
- Endpoint
Controller - The per-endpoint adaptive controller.
- Endpoint
Report - Per-endpoint simulation results.
- Gcra
- A single-rate, spacing-oriented GCRA pacer.
- Gradient2
- A fractional Gradient2 operating-point controller.
- Gradient2
Config - Parameters for the fractional Gradient2 controller.
- InFlight
Request - A request that has actually been dispatched and is now counted against the emergency inflight cap.
- Latency
Estimator - Smoothed endpoint RTT estimates.
- Latency
Estimator Config - Configuration for the endpoint latency estimator.
- Probe
- An active temporary probe.
- Probe
Schedule - Randomized probe policy. The random source is supplied by the caller so simulations can use a seeded RNG and production code can use its preferred entropy source.
- Probe
State - Per-endpoint probe state.
- Simulated
Endpoint - A fixed-service-time endpoint used by
simulate. - Simulation
Config - Configuration for a deterministic offered-load simulation.
- Simulation
Report - Aggregate simulation results.
Enums§
- Dispatch
State - The result of asking whether a virtual queue reservation may dispatch.
- Outcome
- Classification supplied by the caller after a request completes.
- Probe
Kind - The temporary perturbations supported by Loadpace.
- Schedule
Error - A small error used by callers that want to model rejected scheduling explicitly in a simulator or their own adapter.
Functions§
- simulate
- Runs a fixed offered-rate workload through adaptive endpoints and P2C.