Add ExitIdle method in balancer.Balancer interface #8345
Labels
Area: Resolvers/Balancers
Includes LB policy & NR APIs, resolver/balancer/picker wrappers, LB policy impls and utilities.
Type: API Change
Breaking API changes (experimental APIs only!)
Uh oh!
There was an error while loading. Please reload this page.
There is an
ExitIdler
interface that was added four years ago, which includes theExitIdle
method:grpc-go/balancer/balancer.go
Lines 365 to 377 in 6995ef2
This is an optional interface that LB (load balancer) policies can implement. The
ExitIdle
method is called by the channel to transition the LB policy out ofIdle
mode when the channel is connected but no RPC has been made (i.e., the picker hasn't been called). If a top-level LB policy doesn't implementExitIdler
, thegracefulswitch
balancer invokesConnect
on all subchannels created by the LB policy.As noted in the interface's godoc, “it will be required for all balancers to implement this in a future release.” Recently, we discovered potential bugs that can occur when a tree of LB policies is used and the parent LB implements
ExitIdler
but a child LB does not. To address this, we’ve decided to moveExitIdle
into theBalancer
interface directly.This is a breaking change. However, since the
balancer
package is markedexperimental
and it has been four years sinceExitIdler
was introduced, we believe this change is acceptable.We will fix some known projects that implement their own LB policies and wait for their releases before making the change in gRPC.
The text was updated successfully, but these errors were encountered: