-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Summary: We have DNS cache controlled by gflag dns_cache_expiration_ms (60000 by default). When new RPC call to node with hostname is started and existing record has expired, we start new DNS resolution. And RPC call waits until this DNS resolution completes. But, actually, we don't have to wait until it completes. The address from previous resolution could be used for this RPC call, while cache update could happen in background. Once response to a new DNS request is received, we could update cached entry and use new address for all new RPC calls. This diff implements such behaviour. Also added flag dns_cache_failure_expiration_ms (2s by default) to control the time before DNS resolution retry in case of failure. Added metric dns_resolve_latency that reflects time spend by DNS resolution. Jira: DB-11847, DB-11222 Test Plan: Jenkins Reviewers: qhu, rthallam, slingam Reviewed By: qhu, slingam Subscribers: slingam, ybase Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D35993
- Loading branch information
Showing
4 changed files
with
58 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters