Search code examples
performancednsyslowpagespeed

Minimize DNS Lookup?


I'm trying to improve the performance of my site. If I replace the domain names of static resources such as images, styles, etc. with corresponding IP address, would I gain performance improvement? If so, are there any down sides to this approach?


Solution

  • You'd gain a small improvement in first time DNS lookup performance but you lose the flexibility that DNS provides: change a host IP without having to change all of the static references to the host, DNS based load balancing, etc. A well designed CDN strategy will serve you much better. Work on balancing concurrent request vs DNS lookups, depending on the number of static resources per page, that'll be between two and four DNS hostnames.