import type { ChronicleServerAddress } from './ChronicleConnectionString.js'; import type { ILoadBalancerStrategy } from './ILoadBalancerStrategy.js'; /** * Selects the least-loaded candidate by probing each one's current connection count over * HTTP and picking the minimum, breaking ties randomly. This is the default strategy. * * Before every probe attempt (not just the first), waits a random jitter to avoid a * thundering herd of clients probing every candidate at the exact same instant. A single * candidate is returned immediately without probing, since there is nothing to choose * between. */ export declare class LeastConnectionsLoadBalancerStrategy implements ILoadBalancerStrategy { private readonly _skipTlsValidation; private readonly _maxJitterMs; private readonly _dispatcher; /** * Initializes a new instance of {@link LeastConnectionsLoadBalancerStrategy}. * @param skipTlsValidation - Whether to skip TLS certificate validation on the * `/connections/count` and `/connections/reserve` probe requests, matching the toggle * used for the gRPC channel itself. * @param maxJitterMs - The maximum jitter, in milliseconds, to wait before every probe * attempt. Defaults to 250ms. 0 disables jitter entirely. */ constructor(_skipTlsValidation: boolean, _maxJitterMs?: number); select(candidates: ChronicleServerAddress[]): Promise; private jitter; private probeConnectionCount; private reserve; } //# sourceMappingURL=LeastConnectionsLoadBalancerStrategy.d.ts.map