DNS-Prefetch of domains which are resulting in SPOF

112 Views Asked by At

What happens if i inject

<link rel="dns-prefetch" href="www.example.com" /> 

in the head of the document and the domain example.com is down (SPOF).

Will it affect the page load time?.

1

There are 1 best solutions below

0
On BEST ANSWER

No (well, effectively anyway).

For starters, the DNS resolution isn't tied to the service itself (usually) and is cached along the way in the network. Usually when a service is down it will still resolve fine.

Assuming that the DNS resolutions are timing out it still won't have any impact. The dns-prefetch hints are just that and not required to complete loading the page so the browser could continue trying to resolve it while the page does what it needs to and it won't delay anything else.

The slight caveat is that the browser may limit concurrent DNS lookups because of buggy home routers (Chrome limits it to 6 but it is subject to change). In theory the dns-prefetch hint could tie up one of those concurrent DNS lookup slots but practically speaking it's not very likely and the impact will be minimal (probably not even measurable).