Pergunta

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?

Foi útil?

Solução

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.

Outras dicas

If you find that DNS is causing real delays for actual users in the field, you should change your DNS provider.

Your authoritative DNS provider should at least be using anycast to serve the requests from the same contintent as the end-user.

Don't even think about running authoritative DNS in-house. Outsource it every time (NB: Run your own resolvers for your infrastructure, if that makes sense; users' browsers won't be using those).

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top