Leverage Parallelize Downloads Across Hostnames


For viewing all tips see here


Applicable To
All Browsers

How Improves Page Load Time
By optimizing parallelization of external resource downloads

Prologue
[Detail of the technology / concept being used in the tip if required]


Why
As per HTTP 1.1 specification, browsers should allow at most two concurrent connections per host name.  Few of the modern browsers allow more than two connections also.  If an HTML contains references to more (than two) resources then browser requests for 2 resources (or concurrent connections limit) and queues the rest of requests for other resources.  By serving resources from different hostnames allows download in parallel


How
o        Split static resources like images across multiple host names using DNS aliases
o        Serve static files using a CDN as the CDN might be applying this technique by default


Exceptions
o        Using multiple concurrent connections might cause CPU overhead on the Client side.
o        Add DNS lookup overhead
o        Additional new TCP connections overhead
o        Beyond certain number of connections, it degrades the performance
o        Many browsers do not download JavaScript files in parallel, so there is no benefit of serving them from multiple host names.


Recommendations
o        The optimal numbers of hosts are 2-5, depending on various factors like file sizes, bandwidth and so on
o        Use this technique if a page serve more than 10 static resources from the same host name

Comments

Popular posts from this blog

Performance Test Run Report Template

Understanding Blockchain

Bugs Management in Agile Project