Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grpc-js: Make a few improvements to DNS resolving timing #2571

Merged

Conversation

murgatroid99
Copy link
Member

@murgatroid99 murgatroid99 commented Sep 11, 2023

This makes a few improvements to issues exposed by the test linked from #2570, specifically related to closing a connection immediately after it is established

  1. In ResolvingLoadBalancer, reset the backoff timer when name resolution succeeds.
  2. In DnsResolver, start the timers before starting resolution, because the timers can be cancelled immediately after starting resolution, and if they can happen in the wrong order they won't actually be cancelled.
  3. Also in DnsResolver, cancel the rate limiting timer when outputting a result for an IP address target. The purpose of the rate limit is to limit DNS query traffic, and an IP address target does not result in a DNS query so the rate limit is unnecessary.

Experimental changes:

  • Added BackoffTimeout#getEndTime, to get the approximate time when the timer will fire, if it is running.

@murgatroid99 murgatroid99 merged commit c8cbffa into grpc:@grpc/grpc-js@1.9.x Sep 13, 2023
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants