CDN vs VPS

1+ seconds is an eternity for user experience. Makes a site feel very sluggish if you have to wait that long for things to start loading in the browser.

Ideally you want < 200ms to make site response feel snappy.

First visit load times are critical for engagement with the site and for SEO ... Google now measures these things and penalises slow sites.

I believe Amazon did some studies on their own website on load times and found that even a 100ms delay in load times lead to a dramatic drop in sales. Similarly, Google found that adding more search results to a page (at the cost to a 500ms delay in load times) resulted in far fewer searches being performed, and a substantial drop in revenue from search traffic.

Here is a page that summarises some of the reports about page load times (see reference links at the bottom of that page for sources).

Page load times and responsiveness do matter.
Wow wtf. Didn't know it was that serious.

Note to self, after installing Microcart make sure it loads super fast.
 
1+ seconds is an eternity for user experience. Makes a site feel very sluggish if you have to wait that long for things to start loading in the browser.

Ideally you want < 200ms to make site response feel snappy.
I'm not sure I understand. IMO, is it IMPOSSIBLE to have a dynamic site load in less than 200ms.
Even Google frontpage takes almost 1 second to load, while logged out.

IMG_19092013_163358.webp
 
I'm not sure I understand. IMO, is it IMPOSSIBLE to have a dynamic site load in less than 200ms.
Even Google frontpage takes almost 1 second to load, while logged out.

No, I wasn't talking about total page load time - some of those asynchronous loads or background image loads are not important to the direct user experience (which is why they are loaded asynchronously or in the background) ... we're talking about the time taken to generate the HTML itself and send it to the browser and have the browser start rendering it. That is the critical part of the user experience - the time it takes to see something start rendering on the screen so they can then continue to interact with the page.

As you know, the first thing a web server does is ask the application server (in this case, the PHP interpreter) to render a page as HTML, once that is done, the web server can then send it back to the requesting browser. Once the browser has received that HTML, it can then parse it and start to load the other page elements (CSS, JS, images, etc).

The faster you can get the browser to render the HTML and present even an unfinished page to the user, the more responsive the page feels to the user, even if the page doesn't complete loading for another second or two.

This is why optimising the speed of your site involves activities like identifying which elements are critical to rendering the page layout and loading them first, deferring anything else which is not critical until after those important bits are loaded. Oh, and of course, getting those critical page elements to the browser as quickly as possible - front-end caching of pre-rendered HTML makes a HUGE difference if you can do it, but at least having the main CSS file loaded from a low-latency CDN near the user will also help, since CSS is critical to rendering the page.

If you look at the presentation where that comment about page load times for Google came from (see attachment), you'll see the experiments they were about inserting delays in the response from the server, or inserting delays after the main HTML, CSS and JS were loaded (the header), or inserting delays after the page was loaded with adverts, but before the search results loaded.

The total page load time is not as critical as the perceived load time, the time it takes to load the page header and start rendering useful page content that the user can actually interact with.

I'm in Australia, VPS hosting is relatively expensive here. Many people run their websites out of the US to get better value for money. However, depending on where you locate your servers, the latency of the network alone can add up to 500ms to the time it takes to load the first page elements - thus making the site feel a lot slower, even if the overall page load times aren't that different once the page actually starts loading.

We're not just talking about numbers on a page, this is a very noticeable thing you can experience yourself.

When I was choosing a VPS provider, I actually signed up with quite a few and did experiments to find who had the nest network latency from Australia (although this is, of course, ISP specific).

Just looking at the latency of various Linode datacentres around the world ... from my place in Sydney, Australia (using Internode on Naked ADSL2+ with Annexe-M at approx 16Mb/2Mb for anyone in Australia reading this):

Fremont, California: 209ms
Dallas, Texas: 233ms
Newark, New Jersey: 250ms
Atlanta, Georgia: 260ms
London, England: 311ms
Tokyo, Japan: 133ms

Compare this to my old shared hosting provider who hosts their machines in Sydney: 30ms

So, you can see why I chose Tokyo as my datacentre - nearly 40% less latency than California.

Of course, my ISP has direct network links to Japan, so my results won't necessarily be reflected by other people in Australia whose ISPs might direct traffic to Japan via Singapore and/or Hong Kong ... but the point is that, relatively speaking, the time it takes to get a response from my VPS in Tokyo is significantly faster than if I was hosting in the US.

I actually had a VPS located in their Newark datacentre for a year of so (that site had an audience of mostly US and UK customers), and it was noticeable how much slower it felt (to me) than similar sites hosted in Tokyo - all due to network latency.

If I did a download speed test from each of these sites (downloading a non-cached 100MB file), the results were generally fairly similar - it wasn't the speed of the network that was the problem, it was the latency. It is latency which causes a perception of slow page loads.

If you further delay the page loading by having a poorly tuned database, or not using tools like opcode caching, or having too many unnecessary database queries, the perception of pages loading slowly is even worse.
 

Attachments

  • 20-09-2013 8-39-15 AM.webp
    20-09-2013 8-39-15 AM.webp
    58.9 KB · Views: 10
Top Bottom