type alias LoadBalanceStrategy
Since 0.2.0

How IServiceDiscovery.pick chooses among healthy instances.

  • round-robin — a per-service cursor, taken modulo the current count.
  • random — uniform.
  • weighted-random — proportional to ServiceInstance.weight.

Definition

"round-robin" | "random" | "weighted-random"

Usage

import { type LoadBalanceStrategy } from "common/src/index.ts";