45

We're looking at putting our static content – JavaScript, CSS, images, etc. – on a CDN.

Currently we're serving this content from http://sstatic.net. While this works great, it means that I (sitting in Berlin) have to get my CSS from all the way across the Atlantic, because the servers that run sstatic.net are in New York.

The (main) idea of a CDN is that content should be delivered from a location as close as possible to the user, so they get their data faster.

To check if this idea lives up to its promise, I'd like to ask you to make a quick test: To measure (using Chrome dev tools, Firebug, or something similar) how long it takes to download a file from the CDN, compared to downloading it directly from us.

Using the Chrome Developer tools, it looks like this for me:

network tab of chrome dev tools

Please make a few requests to each of the two links above (using Ctrl-F5, so the file is actually redownloaded), and post a typical example of latency and total download time for each file.

Note that the very first request to the CDN may or may not be slower – that's expected. Please also post your (rough) location.

Example result:

  • From Berlin, Germany
  • sstatic: 152ms latency, 576ms total
  • CDN: 52ms latency, 201ms total

Thanks in advance!

6
  • 21
    Oh, and since we have a lot of devs/server-admins here.... TURN OFF FIDDLER / WIRESHARK / ETC. Not that I would make such an elementary mistake... cough. May 6, 2011 at 8:40
  • 4
    It might be worth noting, for anyone doing this test, that if you're using Google DNS (or any other unusual DNS provider that's not related to you by geography), your results will be skewed. May 6, 2011 at 17:53
  • 2
    @AdrianPetrescu: The CDN uses anycast. By my (admittedly small) understanding of this technique, the DNS server shouldn't matter. Everybody gets sent to 67.201.31.56.
    – balpha StaffMod
    May 6, 2011 at 17:59
  • Oh, I see. Ignore my comment, everyone! =x May 6, 2011 at 18:01
  • 1
    I'm sure this query can be cited to show that CDN really matters.. ;) See guys we've got stats and benchmarks across the world to show. :D May 7, 2011 at 23:27
  • The CDN is blocking so often for me or my proxy that I sometimes want to punch the screen :(
    – mplungjan
    Oct 17, 2016 at 7:26

47 Answers 47

9

Londonenter image description here

http://sstatic.net/js/full.js (SO)

Averages around 140ms
Ranges from 120ms - 180ms
Latency steady around 120ms

http://cdn.sstatic.net/js/full.js (CDN)

Averages around 90ms
Ranges from 50ms - 120ms
Latency variable 40ms - 90ms
1
  • 34
    Which of those three is you?
    – balpha StaffMod
    May 6, 2011 at 8:44
8

Sydney:

cdn:

  • Latency: 176ms - 340ms
  • Total: 680ms - 850ms

sstatic:

  • Latency: 280ms
  • Total: 1.05s
2
  • Wow > 1 second?!?!
    – Tom
    May 6, 2011 at 8:41
  • 7
    @Tom well, it's twice the distance from NY. (Although I don't know how much is down to that, and how much is down to router hardware, rusty intertubes, stopping for the panoramic view in Hawaii etc.)
    – Pekka
    May 6, 2011 at 8:45
6
  • Manch Vegas, NH
  • sstatic: 56ms/105ms
  • CDN: 83ms/164ms
1
  • Interesting. You're seeing the same backwards results that I am, with the CDN actually being slower. Good to see I'm not the only one experiencing such weirdness! May 7, 2011 at 12:39
6

Austin, Texas

sstatic:

  • ~265 ms total (max 312 ms, min 256 ms)
  • ~75 ms latency (max 109 ms, min 66 ms)

CDN:

  • ~316 ms total (max 358 ms, min 286 ms)
  • ~105 ms latency (max 152 ms, min 78 ms)

(Hmm, I'm seeing opposite results compared to folks on the other side of the world. I might have mixed feelings about this proposal...)


Traceroute to sstatic:

Tracing route to sstatic.net [64.34.119.12]
  1     1 ms    1 ms    1 ms  192.168.2.1
  2    14 ms    8 ms    9 ms  10.245.128.1
  3    11 ms   11 ms   14 ms  gtwncmts-A.tex.sta.suddenlink.net [173.219.254.96]
  4    14 ms   14 ms   13 ms  tyrm-10g.tex.sta.suddenlink.net [173.219.254.80]
  5    43 ms   39 ms   41 ms  66-76-232-13.tyrd.suddenlink.net [66.76.232.13]
  6    40 ms   39 ms   41 ms  chicosrc01-10gex1-1.tex.sta.suddenlink.net [66.76.232.6]
  7    41 ms   54 ms   41 ms  peer1-gw.peer1.net [206.223.119.30]
  8    57 ms   55 ms   56 ms  10ge.xe-0-0-0.nyc-telx-dis-2.peer1.net [216.187.114.162]
  9    57 ms   60 ms   56 ms  oc48-po3-0.nyc-75bre-dis-1.peer1.net [216.187.115.134]
 10    59 ms   58 ms   58 ms  gwny01.stackoverflow.com [64.34.41.58]
 11    57 ms   58 ms   60 ms  stackoverflow.com [64.34.119.12]

Traceroute to cdn:

Tracing route to sstatic.stackexchange.netdna-cdn.com [67.201.31.56]
  1     1 ms    1 ms    1 ms  192.168.2.1
  2    10 ms    9 ms    9 ms  10.245.128.1
  3    12 ms    9 ms   14 ms  173-219-254-222-link.tex.sta.suddenlink.net [173.219.254.222]
  4    15 ms   13 ms   13 ms  tyrm-10g.tex.sta.suddenlink.net [173.219.254.80]
  5    47 ms   47 ms   52 ms  ashb-osr01.suddenlink.net [66.76.30.166]
  6    47 ms   46 ms   49 ms  ashbosr03-10gex1-1.atw.sta.suddenlink.net [66.76.219.34]
  7    54 ms   53 ms   53 ms  xe1-0.cr01.iad01.mzima.net [206.223.115.62]
  8     *       *       *     Request timed out.
  9    46 ms   46 ms   45 ms  67.201.31.56

The traceroute results for each are fairly consistent. Running the original test again, I see the CDN clocking in closer to 280 ms total, sstatic remains the same, and the latency for both remains the same.

This may be my ISP's fault. We went through a time when they were apparently routing traffic through a server in Louisiana, causing Google and all the other "auto-detect-your-location" pages to determine that we simply did not live anywhere in Texas. If they're doing the same sort of silliness, that may explain why I'm getting routed to a CDN server that is more geographically less convenient for my location.

5
  • can you tracert to the cdn and post that as an addendum? May 6, 2011 at 10:20
  • Where does 67.201.31.56 tell you it is?
    – balpha StaffMod
    May 6, 2011 at 10:59
  • @balpha: Virginia: "You are hitting the NetDNA Virginia Datacenter" May 6, 2011 at 11:02
  • Hmm interesting. I would expect you to hit Dallas.
    – balpha StaffMod
    May 6, 2011 at 11:05
  • 3
    @balpha: Yeah, me too... My iPhone over 3G hits Dallas (not sure where the traceroute app is). I suppose that makes it even more likely to be my ISP's fault. May 6, 2011 at 11:13
6

Willemstad, Curaçao, connected by ARCOS.

enter image description here


sstatic: latency ~90ms, total ~330ms

Tracing route to sstatic.net [64.34.119.12]

  1     1 ms    <1 ms    <1 ms  192.168.1.1
  2     1 ms     1 ms     1 ms  10.0.0.1
  3     6 ms     6 ms     6 ms  190.88.64.1
  4     7 ms     6 ms     6 ms  sub-174ip9.rev.onenet.an [216.152.174.9]
  5    43 ms    42 ms    43 ms  gige3-17.usa.nmi-edge05.columbus-networks.com [63.245.69.85]
  6    43 ms    43 ms    42 ms  xe-0-0-1.usa.nmi-teracore02.columbus-networks.com [63.245.5.84]
  7    43 ms    43 ms    43 ms  xe-1-0-0.usa.nam-core02.columbus-networks.com [63.245.5.141]
  8    44 ms    44 ms    44 ms  nota-exch.gig1-0.peer1.net [198.32.124.125]
  9   150 ms    58 ms    57 ms  10ge-ten1-2.atl-telx-cor-1.peer1.net [216.187.124.70]
 10    58 ms    57 ms    57 ms  10ge-ten1-1.atl-101mar-cor-1.peer1.net [216.187.120.226]
 11    70 ms    70 ms    71 ms  10ge.xe-1-0-0.wdc-eqx-dis-1.peer1.net [216.187.115.37]
 12    71 ms    71 ms    71 ms  10ge.ten1-2.wdc-sp2-cor-1.peer1.net [216.187.115.234]
 13    71 ms    72 ms    71 ms  216.187.120.254
 14    76 ms    75 ms    76 ms  10ge.xe-2-0-0.nyc-telx-dis-1.peer1.net [216.187.115.221]
 15    76 ms    75 ms    75 ms  10ge.ten1-3.nyc-75bre-dis-2.peer1.net [216.187.115.166]
 16    76 ms    76 ms    76 ms  gig2-0.nyc-gsr-b.peer1.net [216.187.123.5]
 17    77 ms    76 ms    77 ms  gwny01.stackoverflow.com [64.34.41.58]
 18    76 ms    76 ms    76 ms  stackoverflow.com [64.34.119.12]

cdn: latency ~65ms, total ~250ms

Tracing route to sstatic.stackexchange.netdna-cdn.com [67.201.31.56]

  1     1 ms    <1 ms    <1 ms  192.168.1.1
  2     1 ms     1 ms     1 ms  10.0.0.1
  3     6 ms     6 ms     6 ms  190.88.64.1
  4     6 ms     6 ms     6 ms  sub-174ip9.rev.onenet.an [216.152.174.9]
  5    43 ms    42 ms    43 ms  gige3-17.usa.nmi-edge05.columbus-networks.com [63.245.69.85]
  6    57 ms    59 ms    43 ms  xe-1-1-3.usa.nmi-teracore02.columbus-networks.com [63.245.5.146]
  7    43 ms    43 ms    46 ms  xe-1-0-0.usa.nam-core02.columbus-networks.com [63.245.5.141]
  8    55 ms    52 ms    53 ms  ge0-2.cr01.mia01.mzima.net [198.32.124.89]
  9    73 ms    70 ms    71 ms  te0-1.cr1.atl1.us.packetexchange.net [69.174.120.46]
 10    60 ms    59 ms    59 ms  69.174.38.2
 11    59 ms    59 ms    59 ms  67.201.31.56
6

From Goa, India

enter image description here

http://sstatic.net/js/full.js (SO)

avg around 742ms
Latency around 740ms

http://cdn.sstatic.net/js/full.js (CDN)

avg around 337ms
Ranges from 308ms - 1.06 seconds
Latency around 308ms
5
  • From Cologne, Germany
  • sstatic: avg. 100ms latency, avg. 400ms total
  • CDN: avg. 60ms latency (but 127ms on the very first call), avg. 200ms total
5

Vienna, Austria

  • sstatic: ~620ms (min: 547ms, max: 687ms)
  • cdn: ~330ms (min: 297ms, max: 375ms)
5
  • From GLOS, UK
  • sstatic: 120ms latency, 425ms total
  • CDN: 40ms latency, 124ms total
5
  • From Colombo, Sri Lanka
  • sstatic: 250ms latency, 810ms total
  • CDN: 205ms latency, 710ms total
5
  • From UK (East)
  • sstatic: ~171-266ms, ~328-438ms total
  • CDN: ~18ms, ~35-50ms total
5
  • From Helsinki, Finland
  • sstatic: 140ms latency, 400ms total
  • cdn: 40ms latency, 120ms total
5
  • From Linz, Austria
  • sstatic: 132ms latency, 282ms total
  • CDN: 121ms latency, 261ms total
5

From East Bay Area, CA:

  • sstatic: 111ms latency, 314ms receiving
  • cdn: 28ms latency, 85ms receiving
5

Prague, Czech Republic:

cdn.sstatic.net:

  • Latency: 84 ms (73 ms min, 119 ms max)
  • Total: 170 ms (152 ms min, 222 ms max)

sstatic.net:

  • Latency: 205 ms (130 ms min, 265 ms max)
  • Total: 459 ms (383 ms min, 524 ms max)
5

Germany:

  • cdn.sstatic.net: 14 ms (39 ms total)
  • sstatic.net: 109 ms (433 ms total)
5

From Ghent, Belgium:

I fetched them 10 times:

sstatic:

  • Time: 505-832, avg 699
  • Latency: 209-332, avg 264

cdn:

  • Time: 74-259, avg 114
  • Latency: 24-222, avg 51

    (remark: with the cdn, the first fetch was the max value, and all subsequent runs took only half or less than half of that max time)

5

Bangalore, India

  • sstatic: latency 744ms, total 1.27s
  • cdn: latency ~264ms, total ~720ms
5

From Basingstoke, UK. Using Firebug (and assuming latency = total - download), having pre-loaded DNS1:

  • sstatic: latency:,217ms total: 548ms
  • CDN: latency 92ms; total: 214ms

1 Tracert shows 7 hops to the CDN looking like it ends in Holland in ~32ms compared to 18 hops to NY for for static in ~122ms, so I would have expected the difference to be greater.

5
  • From London, UK
  • sstatic: 102ms/106ms
  • CDN: 15ms/16ms
5

From somewhere in the Northwest nearish to Manchester, UK, on a slow link, using apachebench (ab -n20 "http://...:

No CDN:

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:      140  330 676.2    144    3156
Processing:  1200 1410 471.4   1232    3240
Waiting:      168  215 176.5    173     964
Total:       1347 1740 848.7   1388    4364

CDN:

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       75   87  26.4     80     196
Processing:   416  481 118.8    440     868
Waiting:       88  119  70.9     99     404
Total:        491  568 139.0    519    1064
5

Buenos Aires, Argentina

Asadou

 sstatic: 657ms latency, 1100ms total
 CDN:     266ms latency,  871ms total
2
  • 1
    Interesting... picture... May 7, 2011 at 19:55
  • Que hambre que me diste!
    – Aleadam
    May 7, 2011 at 23:05
4
  • From Cologne, Germany
  • sstatic: 127ms latency, 484ms total
  • CDN: 21ms latency, 81ms total
4
  • Warsaw, Poland
  • sstatic: ~120ms/~370ms total
  • CDN: ~60ms/~160ms total
4
  • From Kuwait
  • sstatic: 330ms latency, 422ms total
  • CDN: 264ms latency, 352ms total
4

France, Strasbourg

sstatic: 506ms total, 306ms latency
CDN: 72ms total, 70ms latency

4

Connection 1

  • From Tokyo, Japan
  • sstatic: ~694ms, ~822ms total
  • CDN: ~475ms, ~785ms total

Connection 2

  • From Tokyo, Japan
  • sstatic: ~194ms, ~559ms total (ping to 64.34.119.12: ~174ms)
  • CDN: ~128ms, ~380ms total (ping to 67.201.31.56: ~124ms)
4

Timisoara, Romania (work):

- sstatic: 668ms/337ms (max. 767/381, min 546/284)
- CDN:     479ms/362ms (max. 969/853, min. 234/116)

Timisoara, Romania (home):

- sstatic: 583ms/189ms (max. 665/272, min. 531/137)
- CDN:     266ms/127ms (max. 500/378, min. 163/41)
3

Singapore

sstatic: 245ms latency, 807ms total
CDN: 214ms latency, 630ms total

Firebug does report some weird results for the CDN, with latency ranging from 220ms to 472ms averaging 363ms (number reported for CDN taken from Chrome, whose number seems more consistent). The amount of time taken receiving the file is the approximately the same at around 420ms though

1
  • That's pretty much what I got in The Philippines (Manila)
    – user50049
    May 7, 2011 at 1:42
3

Seattle, WA

On Comcast Business:

  • sstatic: 191ms latency, 379ms time (varying about 15% reload to reload)
  • cdn: 10ms latency, 55ms time (varying about 5% reload to reload)

On Speakeasy:

  • sstatic: ~220ms latency, ~500ms time (varying by nearly 100ms request to request)
  • cdn: ~100ms latency, ~190ms time (varying by about 20ms request to request)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .