Skip to content
Buy me a coffee

vegas

vegas(options?): LimitAlgorithm

Defined in: src/adaptive-concurrency.ts:58

TCP Vegas applied to concurrency. The fastest latency seen is the no-queue latency; with limit calls in flight at latency rtt, limit * (1 - minRtt / rtt) of them are waiting in the dependency’s queue. Keep that queue between alpha and beta: below means unused capacity, above only adds latency. Thresholds scale with log10(limit) so large limits tolerate a longer queue. Instead of Vegas’ fixed +-1 steps, the limit moves toward the band by the queue error (damped), which converges in a few round trips.

VegasOptions = {}

LimitAlgorithm