Skip to content

Commit

Permalink
round_robin works!
Browse files Browse the repository at this point in the history
  • Loading branch information
demmer committed Mar 22, 2024
1 parent dbccdda commit 0359ecd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 65 deletions.
61 changes: 0 additions & 61 deletions go/vt/vtgateproxy/gate_balancer.go

This file was deleted.

5 changes: 1 addition & 4 deletions go/vt/vtgateproxy/vtgateproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,8 @@ func (proxy *VTGateProxy) getConnection(ctx context.Context, target string) (*vt

// Otherwise create a new connection after dropping the lock, allowing multiple requests to
// race to create the conn for now.
// grpcclient.RegisterGRPCDialOptions(func(opts []grpc.DialOption) ([]grpc.DialOption, error) {
// return append(opts, grpc.WithBlock()), nil
// })
grpcclient.RegisterGRPCDialOptions(func(opts []grpc.DialOption) ([]grpc.DialOption, error) {
return append(opts, grpc.WithDefaultServiceConfig(`{"loadBalancingConfig": [{"slack_affinity_balancer":{}}]}`)), nil
return append(opts, grpc.WithDefaultServiceConfig(`{"loadBalancingConfig": [{"round_robin":{}}]}`)), nil
})

conn, err := vtgateconn.DialProtocol(ctx, "grpc", target)
Expand Down

0 comments on commit 0359ecd

Please sign in to comment.