Physical distance

Where the client and the server are located has a great impact on the user experience. If they are close and the Internet connection is fast, a website can load even in 2 seconds, but if they are far and the packets have to move through many hops at slower speeds, the same site can loaded in 20 seconds. The slowdown factor can vary up to 10 times and maybe even more on a mobile device. For every resource we have, the physical distance needs to be travelled two times—one for the request and one for the response. With a large distance, only the DNS lookup can take a couple of seconds. The blog page on this site is said to load in 7 seconds from China, despite being fairly lightweight. Steve Souders has tested businessinsider.com and found that it can take more than 30 seconds to load from the same location in China.

Site performance varies with the conditions of the environment and it is unrealistic to think that we can measure it precisely. What we develop locally presents a best-case scenario—one that allows us a relative comparison of the changes we make. This is what we can measure and it can be quite useful. But the performance of what is live is just a snapshot in time and the result depends on the number of simultaneous requests, physical distance, server load, network congestion and other factors, many of which are beyond our control. Gaining insights from metrics that vary too much can be very hard. We need to think of the worst-case scenario and prepare for it in advance.

bit.ly/15bYr21