DNS-based failover of long-lived grpc connections

29 views
Skip to first unread message

meth...@gmail.com

unread,
May 4, 2020, 2:28:25 PM5/4/20
to grpc.io
I have an application that uses go-grpc as transport and I'm wondering if this supports dns-based failover.

I have app1 which speaks to app2 on the dns record app2.example.com. Under normal circumstances these connections are very long lived - weeks. I'm wondering if there is handling in the grpc library such that when a DNS record content changes at TTL expiration, are reconnections triggered?


That is, if app2.example.com changes from 1.1.1.1 to 2.2.2.2, will I see that all connections by app1 will be reset to the new app2 address once the TTL expires?

I've been looking around the docs a bit but I haven't seen anything that necessarily covers this scenario

Mark D. Roth

unread,
May 6, 2020, 1:35:03 PM5/6/20
to grpc.io
gRPC does not use DNS TTLs.  However, it does re-resolve when the connection to the server is closed, so you can use server-side connection management to have the server periodically close the connection to force the client to re-resolve.
Reply all
Reply to author
Forward
0 new messages