Just read a great blog post from a few years ago by Todd Hoff over at highscalability.com. In it he provides a primer on all the places where latency can sneak into a website, with links to many other excellent articles on the subject.
A couple of excerpts from his post:
In most cases, roughly half of the time is spent from the moment the browser sends the acknowledgment completing the TCP connection establishment until the first packet containing page content arrives. The bulk of this time is the round trip delay…
To reduce latency your only choice is to reduce the distance between endpoints.
Draw out the list of every hop a client request takes and the potential number of latency gremlins is quite impressive.
I highlight these items because all of them point in the direction that we have taken at Mobolize, which is to stop web traffic at the origin – the browser – before the traffic happens. Kind of a “Minority Report” approach, if you will.
Only by letting the browser access the maximum amount of data from local cache can you maximize the reduction in latency. In this scenario, the only latency is within your endpoint device (CPU, bus, memory, HTML rendering engine), and those are miniscule compared to the other points of latency. All of the other points of latency – network, DNS, routing, web server, app server, propagation, transmission – are avoided.