Linode.com Forum Forum Index Linode.com Forum
Linode Community Forums
 


hostnames to reduce loading time

Click here to go to the original topic

 
       Linode.com Forum Forum Index -> Performance and Tuning
Author Message
jcr



Joined: 14 May 2007
Posts: 39

Posted: Sun Dec 23, 2007 8:31 am    Post subject: hostnames to reduce loading time  

Hello,

I read (http://www.die.net/musings/page_load_time/) that to reduce page loading time, it was good to use several hostnames:
"Rather than having all <img> 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 <img> 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
Back to top  
rainkid



Joined: 22 Mar 2007
Posts: 13

Posted: Sun Dec 23, 2007 10:53 am    Post subject:  

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?
Back to top  
elw00d



Joined: 25 Apr 2006
Posts: 23
Location: At the helldesk

Posted: Sun Dec 23, 2007 7:41 pm    Post subject:  

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?
Back to top  
jcr



Joined: 14 May 2007
Posts: 39

Posted: Sun Dec 23, 2007 11:00 pm    Post subject:  

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?
Back to top  
zunzun



Joined: 18 Feb 2005
Posts: 178
Location: Birmingham, Alabama USA

Posted: Mon Dec 24, 2007 4:12 am    Post subject:  

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
Back to top  
OverlordQ



Joined: 04 Jun 2004
Posts: 200

Posted: Tue Dec 25, 2007 8:34 pm    Post subject:  

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

Or just use less images ;)
Back to top  
zunzun



Joined: 18 Feb 2005
Posts: 178
Location: Birmingham, Alabama USA

Posted: Wed Dec 26, 2007 7:04 am    Post subject:  

OverlordQ wrote: 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 wrote: 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
Back to top  
SteveG



Joined: 30 Nov 2003
Posts: 224

Posted: Thu Dec 27, 2007 6:52 pm    Post subject:  

jcr wrote: 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.)
Back to top  
tofu



Joined: 01 Jul 2006
Posts: 29
Location: Ghent, Belgium

Posted: Fri Dec 28, 2007 8:34 am    Post subject:  

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)
Back to top  
 
       Linode.com Forum Forum Index -> Performance and Tuning
Page 1 of 1