GRPC Call blockingUnaryCall

201 views
Skip to first unread message

EDMONDO SENA

unread,
Apr 11, 2022, 4:33:45 AM4/11/22
to grpc.io
Hi all,

making a client-server call using the following method to open the channel:
ManagedChannelBuilder.ForTarget (<hostname>: port) takes 15 seconds to get the response. Where hostname is the container name 

Can you explain to me what it depends on?

Thanks-
//Edmondo.

Eric Anderson

unread,
Apr 12, 2022, 11:37:14 AM4/12/22
to EDMONDO SENA, grpc.io
It typically does a DNS resolution, connects to the addresses one-by-one until it finds one that works, does a TLS handshake, and the RPC exchange which includes the server's only latency. 15 seconds is a long time. I'd either expect the server is slow to respond or the networking is poor (e.g., dropped packets) causing lots of latency.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/2f9e32af-90bc-49fc-84fa-5b8dfec7b30en%40googlegroups.com.

EDMONDO SENA

unread,
Apr 12, 2022, 11:45:10 AM4/12/22
to Eric Anderson, grpc.io
Using NettyChannelBuilder.NameResolverFactory I Have Fixed the problem, but NameResolverFactory is deprecate.

Which method has replaced it??

Can you gelo me?
Thanks a lot.

//Edmondo.

EDMONDO SENA

unread,
Apr 12, 2022, 11:46:27 AM4/12/22
to Eric Anderson, grpc.io
Can you help me?

Eric Anderson

unread,
Apr 13, 2022, 2:13:42 PM4/13/22
to EDMONDO SENA, grpc.io
What are you accomplishing via the NameResolverFactory? The deprecation notice and the linked issue provide some guidance. But if you share your specific use case I can point you to the replacement approach.
Reply all
Reply to author
Forward
0 new messages