Websites faster than the speed of light

November 21, 2012   by Serge Knystautas

There's a fundamental law in physics that says you cannot break the speed of light. When your fans load your website, the electrical signals from their laptop to our servers are limited by this law, which can have a noticeable impact on how fast your website loads.

The challenge

Most web pages we host require 50 or more rounds of communication between your laptop and our servers.  This is because of the number of images, Javascript files, style sheets, and other supporting information that goes into making our websites look so pretty.

One approach web designers take is to reduce that number to something like 20 or 30, through tech terms like CSS compaction and image sprites. We do our best to use these approaches, but as web sites get very rich and loaded with information, you still end up back where you began with lots and lots of images.

Now, the speed of light is fast, but it's not instantaneous. Let's say you're in Boston and you want to load at http://www.gocrimson.com. The distance between Boston and our servers in Texas is about 2,000 miles. Let's do the math to see how long this takes:

2,000 miles / 186,000 miles per second = 10 milliseconds (0.01 seconds)

10 milliseconds x 50 images, Javascript, CSS files = 500 milliseconds (0.50 seconds)

Ouch, that page is taking half a second to load simply because of the geography and the speed of light!

Breaking the speed of light

A great solution to the speed of light problem is to use a Content Delivery Network, or CDN. This lets you put parts of your websites on servers all around the world. We are currently using a CDN that has 7 servers around North America, 2 servers in Europe, and a few others in Asia, South America, and other continents.

Your fan in Boston now only has to reach a server in Scranton, Pa., instead of all the way back to Texas. That's only 250 miles now.  Let's do the same math.

250 miles / 186,000 miles per second = 1 millisecond (0.001 seconds)

1 millisecond x 50 images, Javascript, CSS files = 50 milliseconds (0.05 seconds)

Right there we've just about eliminated the penalty from the geography and speed of light.

Yes, half a second matters!

Half a second makes a significant difference in how fans few your website performance. A good rule of thumb is to keep the page load time  the time it takes from when you hit enter in your browser and the page finished loading  to under one second. Go above one second and web surfers gets a chance to think about something else they might want to look at and otherwise feel like they're waiting around.

There's an industry term called Apdex which measures how many of your fans are having a good experiencing loading your website. We track every page that's sent from our servers and any slow pages are compared with how many pages load below our threshold. It also removes bandwidth issues, so we're not penalized if our fans are using lots of DSL lines instead of faster Internet connections since that it outside our control.

Losing half a second just because someone is in New England or Washington state would really drop our Apdex score as the speed of light eats up a huge chunk of time. Obviously it's even worse for people in different parts of the world.

Our aim is to have 95% of all pages sent to fans in under a second and we have been doing a good job of this since we started tracking this in September. We review reports during the day and then have weekly summaries emailed to us with how the past week did. This type of tracking allows us to see when the system starts running slowly before it's dramatic enough for our customers to notice.

There's plenty more work to come on making pages load faster, but these new approaches and measuring techniques are giving us an insight into performance in a way we've never had before. We're really excited and hope to keep hammering away at any performance problems so your websites not only look great but feel quick and responsive too.

Follow Us

Archives

Search