You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In places like #3268, people are experiencing a long delay for DNS to resolve addresses after a failure. Since we're using exponential backoff for the connection retry, we should maybe also use it for initial DNS resolution instead of a hard-coded 60 seconds. This would reduce the need for users to plumb #2169. While #2169 is "a good thing," simply having better behavior by default is also "a good thing."
The problem we encounter today is if initial DNS resolution fails, it is retried every 60 seconds. (Note that exiting idle mode re-creates the DNS name resolver, so it should be considered "initial" resolution.) If later DNS resolutions fail, then we are fine because:
But if the initial attempt fails then there won't be an InternalSubchannel and it won't fail periodically which won't trigger refresh().
So there's two ways to trigger the backoff:
implement the backoff in DnsNameResolver directly (so we don't block new connections), or
periodically trigger refresh() if the initial resolution fails (if the addresses are bad we will still do exponential backoff).
(1) is more straight-forward, but (2) would benefit all name resolvers. Since name resolvers notify the ChannelImpl on failure it should be possible to do (2) within ChannelImpl. It may also be possible to plumb things through the LB, such that failed name resolution still creates a subchannel but with zero addresses, and that subchannel could do backoff like normal and trigger refresh().
In places like #3268, people are experiencing a long delay for DNS to resolve addresses after a failure. Since we're using exponential backoff for the connection retry, we should maybe also use it for initial DNS resolution instead of a hard-coded 60 seconds. This would reduce the need for users to plumb #2169. While #2169 is "a good thing," simply having better behavior by default is also "a good thing."
The problem we encounter today is if initial DNS resolution fails, it is retried every 60 seconds. (Note that exiting idle mode re-creates the DNS name resolver, so it should be considered "initial" resolution.) If later DNS resolutions fail, then we are fine because:
refresh()
.But if the initial attempt fails then there won't be an InternalSubchannel and it won't fail periodically which won't trigger refresh().
So there's two ways to trigger the backoff:
(1) is more straight-forward, but (2) would benefit all name resolvers. Since name resolvers notify the ChannelImpl on failure it should be possible to do (2) within ChannelImpl. It may also be possible to plumb things through the LB, such that failed name resolution still creates a subchannel but with zero addresses, and that subchannel could do backoff like normal and trigger refresh().
CC @ericgribkoff, @zhangkun83
The text was updated successfully, but these errors were encountered: