Hostname parellelization, also known as domain sharding, can be done through your MaxCDN account to improve resource loading time. To learn how it works and how to implement it, see below.

Why Domain Sharding is Important

Web browsers put a limit on the number of connections they will make to a host. This means a backlog of resources is always waiting to be downloaded.

While the browser will create as many simultaneous connections to the server as it can, the rest of the resources/files will remain queued, waiting for previous downloads to finish. Because time spent waiting for a connection means slower page load, reducing this “parallelization block” is essential to better performance.

One way to decrease the time a file spends waiting for an open connection is to create multiple sub-domains (eg. static1.domain.com, static2.domain.com). This way the number of resources downloaded in parallel is increased. Creating a sub-domain adds a new pool of connections that the browser can make, allowing more resources to be downloaded at the same time.

Warning

Domain sharding can have a negative effect on performance if not done right. This is because it adds DNS request time as well as connection time to each new concurrent connection on the shard. However, if utilized correctly as illustrated below, you can drastically improve resource load time.

How to Improve Resource Load Time with Domain Sharding

You can parallelize downloads across hostnames with MaxCDN by creating multiple custom domains (CNAME records) and pointing them to the CDN URL (e.g. myzone.yourcompanyname.netdna-cdn.com).

It’s recommended you create between two to four custom domains (see CNAME records tutorial). After creating CNAME records, they need to be added under zone settings within “Custom Domains List” in your MaxCDN Control Panel.

MaxCDN Custom Domain Settings

There is a propagation time for DNS records that you can monitor with online tools like the Global DNS Propagation Checker.

Note

When using this tool, keep in mind green checkmarks indicate that CNAME is propagated and is working at the specified location. If you are switching from existing records, you need to make sure that new ones are applied and propagated.

DNS Propagation Checking Tool

SEO Benefit

Utilizing parallel downloads can improve SEO. Why? Well in order to implement parallel downloads across host names, multiple CNAMEs need to point to your CDN (as described above). Since you are creating CNAMEs under your main domain DNS, search engines will treat your assets with more love as they are coming from a subdomain of your domain.

The sample below shows a single domain being used to load assets. As you can see, parallel downloading is severely limited.

Asset Downloads with no hostname parallelization

The chart below illustrates how files are downloaded when domain sharding or hostname parallelization is implemented. (The difference is quite obvious.)

Asset Downloads with no hostname parallelization

If you have any questions while implementing domain sharding with your MaxCDN account, feel free to contact our awesome CDN support team.

  • Nate Iorg

    An incredibly easy way to accomplish this is pseudo-subdomains. I have a working example on my website, which you can actually link your own assets to using an easy form. Feel free to use it.

    http://myl.io

  • Leo

    After some time trying to implement parallelize downloads across hostnames on my WordPress website I came up with a hack for functions.php — here is the gist > https://gist.github.com/leowebdev/dab3e498e68917fb2938