Interface WorkerChoiceStrategyOptions

Worker choice strategy options.

interface WorkerChoiceStrategyOptions {
    elu?: MeasurementOptions;
    measurement?: "elu" | "runTime" | "waitTime";
    runTime?: MeasurementOptions;
    waitTime?: MeasurementOptions;
    weights?: Record<number, number>;
}

Properties

Event loop utilization options.

{ median: false }
measurement?: "elu" | "runTime" | "waitTime"

Measurement to use in worker choice strategy supporting it.

Runtime options.

{ median: false }

Wait time options.

{ median: false }
weights?: Record<number, number>

Worker weights to use for weighted round robin worker selection strategies. A weight is tasks maximum execution time in milliseconds for a worker node.

Weights computed automatically given the CPU performance.