Blog Post RSS ?

Blogs » PHP » The Case for Registering Multiple Domains
 

The Case for Registering Multiple Domains

by Harry Fuecks

Via /.Optimizing Page Load Time has some very interesting insight, in particular this point;

By default, IE allows only two outstanding connections per hostname when talking to HTTP/1.1 servers or eight-ish outstanding connections total. Firefox has similar limits. Using up to four hostnames instead of one will give you more connections. (IP addresses don’t matter; the hostnames can all point to the same IP.)

That’s actually an HTTP 1.1 recommendation (section 8.1.4);

Clients that use persistent connections SHOULD limit the number of
simultaneous connections that they maintain to a given server. A
single-user client SHOULD NOT maintain more than 2 connections with
any server or proxy. A proxy SHOULD use up to 2*N connections to
another server or proxy, where N is the number of simultaneously
active users. These guidelines are intended to improve HTTP response
times and avoid congestion.

More snippets of insight here and here. This is also something you should think about related to AJAX.

A minor nit: the approach recommended in “Optimizing Page Load Time” is;

Rather than loading all of your objects from http://static.example.com/, create four hostnames (e.g. static0.example.com, static1.example.com, static2.example.com, static3.example.com)

That may not be optimal solution though – if you’re using cookies with a domain like .mysite.com then clients will be sending cookies in their static content requests – that may miss the opportunity to have intermediary proxy servers cache for you, further distributing load / reducing network distances – described in Michael J. Radwin’s HTTP Caching & Cache-Busting for Content Publishers under “3. Cookie-free TLD for static content” (watch for speaker notes).

In other words, when you get to start worrying about this stuff, you probably want to think about registering a separate domain for static content, under which you can then employ subdomains to reduce page load time.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Ping.fm
  • Twitthis

Related posts:

  1. How to Test Multiple Websites on One PC With Apache Virtual Hosts Testing one website on your local web server is easy....
  2. Cookie-less Session Variables in JavaScript Cookies may be delicious, but they can be clumsy if...
  3. SitePoint Podcast #8: The Case For Web Apps InfoWorld slams web apps, giving five reasons why companies should...
  4. Microsoft Office Online: a Case Against Supported Browser Lists Should you publish an official list of supported browsers for...

This post has 5 responses so far

Sponsored Links

SitePoint Marketplace

Buy and sell Websites, templates, domain names, hosting, graphics and more.

Follow SitePoint on...