Sets the strategy for picking the least busy channel from the pool.
Defaults to ChannelPickStrategy#POWER_OF_TWO which avoids the thundering herd
problem by sampling two channels with replacement and picking the less busy one. The first
sample wins ties, with no channel-warmth preference. Inactive samples are retried.
Use ChannelPickStrategy#LINEAR_SCAN to restore the legacy behavior of scanning
all channels and always picking the one with the lowest picker load.
Sets the maximum number of attempts to prime one scaled-up channel. Zero uses the default
of 3. Retry backoff is exponential from 100 ms and capped at 5 s.
Sets the optional hook that primes newly built scale-up channels concurrently. Only
channels added by dynamic scale-up are primed; the initial pool and non-dynamic growth are
published as soon as they are built. Each scale-up channel is published individually when
its own primer future succeeds. A null primer disables priming and preserves the
existing scale-up path.
How frequently affinity key cleanup process should run. Zero value disables cleanup
process. If affinityKeyLifetime is not zero, this defaults to affinityKeyLifetime / 10.
Sets the concurrent streams low watermark. If every channel in the pool has at least this
amount of concurrent streams then a new channel will be created in the pool unless the pool
reached its maximum size.
Sets how long an idle draining channel remains open for sticky affinity references and
in-flight calls before its delegate closes. Defaults to one minute.
After a call is counted, load above maxRpcPerChannel on its selected
channel or across the pool average signals a background scale-up worker.
Every scaleDownInterval, after consecutive low-load checks, the
least-loaded channels are marked draining and removed from selection, bounded by
maxScaleDownChannels; fewer affinity bindings and then older allocations break load ties.
Draining channels receive no new picks or affinity binds and close after their in-flight
calls reach zero and drainIdleGrace elapses. Scale-up always creates new channels.
Sets how long an applied penalty takes to decay linearly to zero. Each new retryable error
resets the decay timer to a full window. Must be positive. Defaults to 5 seconds.
Sets the load penalty added after each retryable channel error. A value of 0 disables error
penalties. Each step accumulates on the stored undecayed penalty, capped at
maxRpcPerChannel. Must not be negative. Defaults to 5.
Sets the maximum percentage of active channels added by one scale-up operation. The
percentage cap has a two-channel floor before desired-size and maximum-size clamps.
Sets the minimum size of the channel pool. This number of channels will be created and
these channels will try to always keep connection to the server established.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-10-05 UTC."],[],[]]