-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update: add DNS caching to request manager
**Summary** Fixes #746. Unfortunately neither Node, nor many systems come with built-in DNS caching so the many parallel requests that Yarn makes sometimes overwhelm the DNS servers, and most of the time, for the very same domain(s). Even worse, we pay the DNS look up cost for each request, which is quite sad at best. This patch introduces the `dnscache` module which intercepts all DNS look ups and answers them from an in-memory cache when possible. This applies to the built-in `http` and `https` modules, used by `request`. **Test plan** Exiting tests should pass, and hopefully be faster. Total number of DNS look ups should decrease dramatically.
- Loading branch information
Showing
3 changed files
with
36 additions
and
5 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