Parallelize downloads across hostnames, this is usually one of the suggestions that Google’s Page speed performance analysis tool in firebug gives you, and is sometimes a very easy task to perform, no matter if you are running Apache or Linghthttpd or Nginx.

Usually are pictures, so let’s say you have your pictures (Or actually any kind of files) in:


Now let’s create another directory structure like this. <p class="codigo">sudo mkdir /var/www/cdn0.your-site -p</p> <p class="codigo">sudo mkdir /var/www/cdn1.your-site -p</p> <p class="codigo">sudo mkdir /var/www/cdn2.your-site -p</p> <p class="codigo">sudo mkdir /var/www/cdn3.your-site -p</p>

Once this is done, create four new virtual servers, that is not going to be covered here, as it varies depending your distro and the web server you are using.

Declare the root of each of them to point the newly created directores, therefore for:

cdn0 the root directory should be /var/www/cdn0.your-site for cdn1 the root directory should be /var/www/cdn1.your-site and so on.

Now run this command for each of those 4 domains.

cd /var/www/cdn0.your-site/

And then <p class="codigo">sudo ln -s /var/www/your-site/images .</p>

Do this with the four domains, all pointing to the same source, and then edit your DNS zone and create four A records.

cdn0 -> [Same ip of] cdn1 -> [Same ip of] cdn2 -> [Same ip of] cdn3 -> [Same ip of]

Now you are ready to restart your web server, and once that is done, you can start editing your webpages to point some images or some css or js files to cdn0 some others to cdn1 and so on, be sure to assign at least 4 files to each domain, otherwise the time you are gaingin in parallelism you are loosing in multiple DNS queries.

Happy optimizing.