Skip to content

Commit

Permalink
Add multiplier for the dialer
Browse files Browse the repository at this point in the history
Originally multipilier is default to 0, which will cause flodding if
backoff happens. Now setting multiplier to 1.6 which is the default
multiplier value in grpc.

Signed-off-by: Hanlin Shi <shihanlin9@gmail.com>
  • Loading branch information
hanlins committed Dec 9, 2020
1 parent ac63c56 commit d231f6c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions container/containerd/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,10 @@ func Client(address, namespace string) (ContainerdClient, error) {
tryConn.Close()

connParams := grpc.ConnectParams{
Backoff: backoff.Config{
BaseDelay: baseBackoffDelay,
MaxDelay: maxBackoffDelay,
},
Backoff: backoff.DefaultConfig,
}
connParams.Backoff.BaseDelay = baseBackoffDelay
connParams.Backoff.MaxDelay = maxBackoffDelay
gopts := []grpc.DialOption{
grpc.WithInsecure(),
grpc.WithContextDialer(dialer.ContextDialer),
Expand Down

0 comments on commit d231f6c

Please sign in to comment.