Closed alexshtin closed 4 years ago
The right way to do this:
conn, err := grpc.Dial(address,
grpc.WithInsecure(),
grpc.WithDisableServiceConfig(),
grpc.WithDefaultServiceConfig(`{"loadBalancingConfig": [{"round_robin":{}}]}`),
)
and address
needs to be specified with dns:///
(yes 3! slashaes) prefix, like dns:///test.temporal.io:7233
.
YARPC uses concept of dispatchers which are created with
DispatcherProvider
interface with one single implementationdnsDispatcherProvider
. With migration to gRPC, call toDispatcherProvider
was replaced with simple host:port. gRPC has support for round robin and custom load balancers as well as service configs. These approaches need to be investigated and Temporal should provide flexible plugable mechanism to support different load balancers for frontend.https://medium.com/@ammar.daniel/grpc-client-side-load-balancing-in-go-cd2378b69242 https://itnext.io/on-grpc-load-balancing-683257c5b7b3