The time it takes to download http resources is a corner stone of a website performance, and ultimately user experience. In this presentation, we review the different network and system setup variables that affect the speed at which each piece of dynamic content gets fetched from a client (e.g. browser) , and explain their relative impact. By leveraging the massive web traffic seen on the Akamai platform, the existing literature and the typical website properties listed at httparchive.org we present a performance model both simple and comprehensive. In particular, we share empirical data for the middle-tier observed RTT, which is one of the main factor impacting download latencies over long distances. To illustrate the model via a web-based chart, we plot the expected performance against the distance client-origin, based on a key set of parameters. It will allow its users to better understand what variables really matter and take actions to improve their website performance
2. ยฉ2014 AKAMAI | FASTER FORWARDTM
What problem are we trying to solve?
โ Help IT organizations optimize their serving infrastructure
by modeling website dynamic resource download times
3. ยฉ2014 AKAMAI | FASTER FORWARDTM
Existing Models:
โ Can be too simple:
โ It is bounded by the speed of light !
โ Can be too theoretical
โ As a result, no reliable and practical ways to predict
download times of dynamic website resources
4. ยฉ2014 AKAMAI | FASTER FORWARDTM
Trivia Question
โ How long does it take to download a 50K resource
from New-York to San-Francisco (~2,500 miles)?
5. ยฉ2014 AKAMAI | FASTER FORWARDTM
What parameters are at play?
6. ยฉ2014 AKAMAI | FASTER FORWARDTM
What parameters donโt really matter
โ Last Mile bandwidth is rarely a download bottleneck
Sources: https://www.belshe.com/2010/05/24/more-bandwidth-doesnt-matter-much/
Akamai State of the Internet report, Q2 2014
7. What parameters donโt really matter, contd.
ยฉ2014 AKAMAI | FASTER FORWARDTM
โ Client receiving window buffer size
โ i.e. how much data can be โin flightโ between a server and a client
โ Typically set at 65 K, larger than most website resources
โ Network loss
โ Assuming here itโs negligible for small resources
Source: httparchive.org
8. ยฉ2014 AKAMAI | FASTER FORWARDTM
What parameters have most impact
โ New or reused connection, HTTP vs HTTPS
โ TCP connection establishment can require many round trips
โ Round Trip Times
โ Last mile latency: Can vary greatly, from ~0 to 100s of ms
โ Middle Mile RTT: Has most impact over long-haul distances
9. What parameters have most impact, contd.
ยฉ2014 AKAMAI | FASTER FORWARDTM
โ Origin server initial TCP congestion window
โ How many packets can be sent at the start of data download
โ Content size and distance client-server
10. ยฉ2014 AKAMAI | FASTER FORWARDTM
Middle Mile RTT
โ Proven difficult to model
โ Cannot be approximated by mathematical equations
โ Is driven by peering negotiations between ISPs
โ -> Built an experimental setup to model its value
11. ยฉ2014 AKAMAI | FASTER FORWARDTM
RTT modeling experimental setup
Ping agents (ICMP)
Ping targets, distribution
matching internet usage
12. ยฉ2014 AKAMAI | FASTER FORWARDTM
RTT/Distance typical distribution
13. Middle-Mile RTT (ms) ~ 3.1 % * Distance (miles)
For distances > 500 miles
ยฉ2014 AKAMAI | FASTER FORWARDTM
SF - NY RTT
at speed of
light = 27 ms
SF - NY RTT
thru internet ~
80 ms
14. Impact of content size & connection type, part 1
ยฉ2014 AKAMAI | FASTER FORWARDTM
Client Server
18. ยฉ2014 AKAMAI | FASTER FORWARDTM
Download times of a 50 KB resource*
โ Direct is ~ 400 ms (Initcwnd=3), ~ 300 ms (Initcwnd=10)
โ Thru CDN intermediaries ~ (80+10+10) ~ 100 ms
* New http connection, 2,500 miles client-server distance, no network loss, no first
or last mile latencies
20. ยฉ2014 AKAMAI | FASTER FORWARDTM
Main take aways
โ Median Middle Mile RTT ~ 3 % of Distance Client-Server
โ This is the primary performance driver over long distances
โ Client bandwidth and TCP buffer size are rarely a
download bottleneck
21. ยฉ2014 AKAMAI | FASTER FORWARDTM
Main take aways, contd.
โ Critical impact of TCP initial congestion window
(=Initcwnd) for new connections.
โ Recent server builds (Linux > 2.6.39) set initcwnd to 10
โ Dramatic differences between new and re-used
connections over long distances
โ Set permanent connections at your origin if possible
โ Consider CDN intermediaries for far-away end-users