brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.74k stars 2.32k forks source link

Browser slowdown if ipv6 DNS over HTTPS is configured in Windows without ipv6 internet connectivity #41656

Open jm-paredes opened 6 days ago

jm-paredes commented 6 days ago

Description

Websites take much longer than usual to load if ipv6 DNS over HTTPS is configured in Windows, without having ipv6 internet connectivity (no public ipv6 IP address, but local network ipv6 address).

Steps to reproduce

  1. Go to Windows network settings
  2. Setup DNS over HTTPS for both ipv4 and ipv6 (ControlD free dns used for this test)
  3. In Brave, set Use secure DNS to ON > OS Default (when available).
  4. Restart the browser and try to load youtube.com or reddit.com

Actual result

Many pages take ~10 seconds to load instead of the usual 1-3 seconds.

Expected result

Websites loading speed remains consistent regardless of if ipv6 DNS over HTTPS servers are set in Windows settings.

Reproduces how often

Easily reproduced

Brave version (brave://version info)

1.70.126

Channel information

Reproducibility

Miscellaneous information

Workaround: In Windows DNS over HTTPS settings, only enable and set the ipv4 DNS servers, not the ipv6 ones. OR Disable ipv6 in Windows for your network card.

My suspicion is that the browser does not fallback quickly to the ipv4 DNS. I was unable to reproduce this issue on Chrome and Edge with the same DNS settings.

Use case for having ipv6 DNS servers configured even when only ipv4 connectivity is available: Laptop that switches frequently between Wi-Fi access points, some with ipv6 and some with ipv4 only.

rebron commented 4 days ago

@jm-paredes When you get a chance, can you update to 1.71.114 and let us know if you're still seeing this issue.

jm-paredes commented 4 days ago

@jm-paredes When you get a chance, can you update to 1.71.114 and let us know if you're still seeing this issue.

It seems partially fixed on Brave version 1.71.114.

  1. Setting up the DNS like this again:

Image

  1. Then in a Windows Terminal do ipconfig /flushdns
  2. Launch Brave and attempt to load websites.

I can measure 9 seconds load times on Google Keep, Gmail and Reddit only on the first load after ipconfig /flushdns. Further visits to those website are now fast, even after restarting Brave. CPU used for the test: 7950X3D.

I could try on my laptop later if needed where I could also reproduce the original issue (Ryzen 7840HS CPU).

Once again, Edge is not affected, is fast even on the first load after ipconfig /flushdns.