Skip to content

Performance problem with localhost instead of 127.0.0.1 #22864

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

Closed
wima75 opened this issue Jun 12, 2020 · 3 comments
Closed

Performance problem with localhost instead of 127.0.0.1 #22864

wima75 opened this issue Jun 12, 2020 · 3 comments
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates feature-spa

Comments

@wima75
Copy link

wima75 commented Jun 12, 2020

Could you make this configurable?

task => new UriBuilder("http", "localhost", task.Result.Port).Uri);

On my system every call to the Angular Live Development Server with localhost will take about 4 seconds. If the call would be 127.0.0.1 instead of localhost it will take some milliseconds.

@javiercn javiercn added area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates feature-spa labels Jun 12, 2020
@Tratcher
Copy link
Member

Localhost resolves to both ::1 and 127.0.0.1. IPv6 is tried first, times out after 5s, and falls back to IPv4.

Why is the development server listening only on IPv4?.

@javiercn
Copy link
Member

@Tratcher this is a dupe of another issue. The problem apparently is that node only listens on IPv4

@javiercn
Copy link
Member

Closing as a dupe of #18062

@ghost ghost locked as resolved and limited conversation to collaborators Jul 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates feature-spa
Projects
None yet
Development

No branches or pull requests

3 participants