Least loaded

Shipped

Routes to the recipient with the most free capacity right now.

Example

How Least loaded decides — the pool is evaluated and the winner is assigned. Each strategy selects differently.

type == "lead"selectedTriggerNew LeadWebhookLeast-loadedLeast loadedStrategyae-westload 2/10ae-eastload 7/10centralload 5/10Assigned
Show the code
// Least loaded selects from the pool and assigns.
engine.Route(ductor.Route{
Match: `routable.type == "lead"`,
Strategy: "least_loaded",
Pool: "sales-team",
})
 
// Durable, observable, exactly-once.
decision, err := engine.Dispatch(ctx, routable)

How it works

Selects the recipient with the lowest current load. Best when you have accurate, low-latency load signals and want to pack work onto the freest workers.

Stateful