Open cageyv opened 1 week ago
Our general recommendation is that servers should drop connections periodically to signal to clients that they should update name resolution information. In grpc-js, you can do this by using the grpc.max_connection_age_ms
and grpc.max_connection_age_grace_ms
options on the server. The grpc.max_connection_age_ms
should be tuned based on how frequently you expect clients to need to get new DNS resolution information. The grpc.max_connection_age_grace_ms
controls how long a server will spend processing requests on a connection after telling the client to stop using that connection, so you should set that based on the longest it generally takes the server to process a request.
As a side note, the grpc.lb_policy_name
is obsolete, and the grpc.service_config
option is its replacement. There is no reason to specify both.
Thanks for the recommendation. Sounds good. I will try it. As soon as I have any news I will update that issue
Problem description
dns_resolver
doesn't refresh the DNS over time, or we don't know how to make this configuration.round_robin
lb_policy_name. In the case ofTRANSIENT_FAILURE
DNS, get refreshed after1.11.3
bug fix.dns_resolver
will not refresh the DNSReproduction steps
For the server-side backends, it is DNS-based load balancing. In our case, this is golang gRPC server. 5 instances, different IP and multivalve DNS. Locally, we could use docker-compose aliases
Environment
public.ecr.aws/docker/library/node:v16-alpine3.17
Apline x64
^16
npm ci
"@grpc/grpc-js": "1.11.3"
,"@protobuf-ts/grpc-transport": "2.9.4"
Additional context
What we did:
log.txt