hostnames to reduce loading time

Hello,

I read (http://www.die.net/musings/pageloadtime/) that to reduce page loading time, it was good to use several hostnames:

"Rather than having all tags load objects from http://static.example.com/, create four hostnames (e.g. static0.example.com, static1.example.com, static2.example.com, static3.example.com) and use two bits from an MD5 of the image path to choose which of the four hosts you reference in the tag."

Does that strategy work on a linode?

Typing hostname returns something like 'li17-118' so if I were to create many subdomains, I would still have one hostname? Thanks for any comment on that strategy

Regards

8 Replies

I think this refers to most browsers allowing only a set number of concurrent connections to a web host (usually 2 or 4).

For example, if you link to your website with 8 images, only 2 will load at a time.

Perhaps what the article is stating is that if you have the linked as different domain names, it tricks the browser into thinking those are separate hosts, thus allowing more concurrent connections.

I guess it's a good idea. Is it really necessary?

Look at this one the other way round: How many requests can your apache setup take simultaneously before meltdown, thus how many concurrent visitors can your site cope with?

Assuming the strategy makes sense for a specific case, can it be implemented on a linode?

I was thinking that an hostname is really the machine hosting the linode. If I create several subdomains for my linode, wouldn't all those subdomains have the same hostname? At that point, I would need to have a couple of linodes and make sure they are on different machines. is that right? Or maybe a machine hosting linodes has as many hostnames as it has of linodes?

I use this strategy for images - one Linode, multiple subdomains pointing to the same address. It works great. Very noticeable reduction in page load time.

James

Or you can just edit the value in your browser to allow more concurrent connections.

Or just use less images ;)

@OverlordQ:

Or you can just edit the value in your browser to allow more concurrent connections.

Now that sounds perfect. How can I do that remotely to the browsers of everyone using my web site? Is there a method that works on all browsers, or at least the major ones? Using that technique, I won't need multiple subdomains at all.

@OverlordQ:

Or just use less images ;)

My site has error histograms, value histograms, error plots, curve plots, surface plots, contour plots, etc. - using less images seems impractical. Perhaps you mean I should consider using an ASCII-only charting library, how would that work for 3D surface plots?

James

@jcr:

Assuming the strategy makes sense for a specific case, can it be implemented on a linode?

I was thinking that an hostname is really the machine hosting the linode. If I create several subdomains for my linode, wouldn't all those subdomains have the same hostname?

The terminology is confusing. In particular, in DNS land, the term "domain name" can include the individual host reference. Thus, "example.com" is a domain name, as so is "www.example.com", and so is "mail.example.com". None of these are required to match what is returned by "hostname" on the actual machine, although it usually does. So yes, you can do this. ( won't even mention the other use of "domain name", which has to do with NIS domains.)

Another advantage of using a statis subdomain is that the visiter cookies is not send to the server when asking for an image/javascript/css. And when you run Lighttpd, like me, then you can set your config file that on the static part he doesn't need to load PHP. I'm also planning to use static domein names 8)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct