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. Commented 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. Commented 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
    Commented May 6, 2011 at 17:59
  • Oh, I see. Ignore my comment, everyone! =x Commented 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 Commented 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
    Commented Oct 17, 2016 at 7:26

47 Answers 47

1
2
2
  • From St. Louis, Missouri
  • sstatic: 56ms latency, 159ms total
  • CDN: 53ms latency, 206ms total

):

3
2

Here are the results I get from the Canadian west coast:

http://sstatic.net/js/full.js:
enter image description here

http://cdn.sstatic.net/js/full.js:
enter image description here

Note: originally I was getting 304s so I did a hard refresh.

4
  • Those are 304s though -- so the files weren't really downloaded. Can you try Ctrl-F5 to get real 200s?
    – balpha StaffMod
    Commented May 7, 2011 at 20:06
  • @balpha: Oh... oops. I'll try it again. Commented May 7, 2011 at 22:41
  • @balpha: I redid the requests and the results are probably a little more positive now. Commented May 7, 2011 at 22:52
  • Thanks! Yeah, that looks better.
    – balpha StaffMod
    Commented May 8, 2011 at 9:29
2

The Hague, The Netherlands

  • sstatic: 190ms latency, 463ms total
  • CDN: 109ms latency, 120ms total

enter image description here

1
  • Yup much faster from Groesbeek as well. 300-400ms from sstatic, 80-90 from CDN
    – Ivo Flipse Mod
    Commented May 13, 2011 at 10:53
2

Cleveland, Ohio:

  • sstatic: 22ms latency, 57ms total
  • CDN: 13ms latency, 35ms total
5
  • I'd love to have these kind of values...
    – balpha StaffMod
    Commented May 6, 2011 at 17:32
  • 1
    @balpha: Even if it meant living in Cleveland?
    – mmyers Mod
    Commented May 6, 2011 at 17:36
  • I'm going to miss them when I graduate (next weekend!)
    – Josh Lee
    Commented May 6, 2011 at 17:37
  • 2
    (Kidding, @jleedev! I'm sure some parts of Cleveland are delightful.)
    – mmyers Mod
    Commented May 6, 2011 at 17:38
  • 2
    @mmyers Just for that, I’m finding an ethernet cable to improve my numbers.
    – Josh Lee
    Commented May 6, 2011 at 17:49
1

Paris, France!

  • sstatic latency ~95 ms, total ~270 ms
  • cdn latency ~25 ms, total ~100 ms
1

Delaware, USA

  • sstatic:
    • 37.2ms latency (54ms max, 28ms min)
    • 105.2ms total (125ms max, 81ms min)
  • cdn:
    • 19.1ms latency (23ms max, 17ms min)
    • 81.5ms total (94ms max, 75ms min)
1

Houston, TX

            CDN                 Non-CDN 
        Total   Latency     Total   Latency
AVG     102.65  69.1        217.7   163.6
MAX     257     158         555     312
MIN     53      46          141     125

all times in ms

Did 20 runs of each using Chrome, using their Network tab on the dev tools

Total = total transit time

Latency = well, latency

1
  • From Saarbruecken, Germany
  • sstatic: 144ms latency, 511ms total
  • CDN: 51ms latency, 177ms total
1

Too lazy to do the download, but here are some tracerts:

Location: London, ON, Canada

From work:

Tracing route to sstatic.net [64.34.119.12]
over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  10.0.0.254
  2     1 ms     1 ms     1 ms  d680.a.ded.execulink.com [69.63.32.125]
  3     *        *        *     Request timed out.
  4     1 ms     1 ms     1 ms  d668.a.ded.execulink.com [69.63.32.113]
  5     4 ms     5 ms     4 ms  i.core2.ip.execulink.net [66.203.176.113]
  6    24 ms    22 ms    21 ms  nyiix.peer1.net [198.32.160.65]
  7    20 ms    20 ms    21 ms  10ge.xe-0-0-0.nyc-telx-dis-2.peer1.net [216.187.115.182]
  8    20 ms    20 ms    22 ms  oc48-po3-0.nyc-75bre-dis-1.peer1.net [216.187.115.134]
  9    21 ms    21 ms    21 ms  gwny01.stackoverflow.com [64.34.41.58]
 10    27 ms    20 ms    25 ms  stackoverflow.com [64.34.119.12]


Tracing route to sstatic.stackexchange.netdna-cdn.com [67.201.31.56]
over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  10.0.0.254
  2     1 ms     1 ms     1 ms  d680.a.ded.execulink.com [69.63.32.125]
  3     *        *        *     Request timed out.
  4   120 ms   203 ms   203 ms  d668.a.ded.execulink.com [69.63.32.113]
  5     5 ms     6 ms     4 ms  i.core2.ip.execulink.net [66.203.176.113]
  6    51 ms    30 ms    25 ms  ge-6-11-111.car1.Toronto2.Level3.net [4.59.180.5]
  7    33 ms    31 ms    19 ms  ae-8-8.ebr1.Chicago1.Level3.net [4.69.140.245]
  8    25 ms    20 ms    20 ms  ae-1-51.edge3.Chicago3.Level3.net [4.69.138.10]
  9    30 ms    19 ms    18 ms  MZIMA-NETWO.edge3.Chicago3.Level3.net [4.53.96.26]
 10    28 ms    21 ms    18 ms  69.174.120.146
 11    34 ms    34 ms    32 ms  te4-5.cr1.nyc1.us.packetexchange.net [69.174.120.73]
 12    30 ms    30 ms    30 ms  69.174.26.2
 13    30 ms    29 ms    30 ms  67.201.31.56

Edit: for some reason I can't tracert at home. Oh well.

1

Here are my results from St. Paul, Minnesota. (USA)

  • sstatic: 155ms (time), 60ms (latency)
  • CDN: 186ms (time), 47ms (latency)
1
  • From Corvallis, OR
  • sstatic: 231ms latency, 429ms total
  • CDN: 38ms latency, 147ms total
1

Manchester UK

  • sstatic latency 140 ms, total 290ms

  • cdn latency 30 ms, total 142ms

1

enter image description here

  • From Tirano(So), Italy
  • sstatic: 145ms latency, 420ms total
  • CDN: 80ms latency, 250ms total
1

From NY:

static: 264ms (176 latency) cdn: 449 (284 latency)

But of course, it's from NY...

1

From Los Angeles, California:

  • sstatic.net: 142ms latency, 470ms total
  • CDN: 101ms latency, 220ms total

CDN at some points went as high as 900ms for latency, and sstatic peaked at 600ms, but I posted a typical set of values for both.

0

Iowa City, Iowa

Calculated from the average of 6 loads with full cache refresh between loads.

  • sstatic: 35ms latency, 72ms total
  • cdn: 24ms latency, 31ms total -- if I exclude the first lookup it's 6ms and 13.6ms, respectively

Traceroutes:

sstatic.net

Tracing route to sstatic.net [64.34.119.12]
over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  rtr-core-lc.net.uiowa.edu [128.255.76.1]
  2    <1 ms    <1 ms    <1 ms  rtr-border-lc.net.uiowa.edu [128.255.2.129]
  3     4 ms     4 ms     4 ms  xe-3-2-0.716.rtr.chic.net.internet2.edu [198.49.
182.7]
  4    21 ms    24 ms    21 ms  xe-0-0-0.0.rtr.wash.net.internet2.edu [64.57.28.
13]
  5    22 ms    22 ms    22 ms  equinixexchange.peer1.net [206.223.115.30]
  6    22 ms    22 ms    24 ms  10ge.ten1-2.wdc-sp2-cor-1.peer1.net [216.187.115
.234]
  7    22 ms    22 ms    23 ms  216.187.120.254
  8    27 ms    27 ms    27 ms  10ge.xe-2-0-0.nyc-telx-dis-1.peer1.net [216.187.
115.221]
  9    28 ms    28 ms    27 ms  10ge.xe-0-0-0.nyc-telx-dis-2.peer1.net [216.187.
115.182]
 10    28 ms    28 ms    27 ms  oc48-po3-0.nyc-75bre-dis-1.peer1.net [216.187.11
5.134]
 11    28 ms    28 ms    27 ms  gwny01.stackoverflow.com [64.34.41.58]
 12    28 ms    28 ms    28 ms  stackoverflow.com [64.34.119.12]

CDN

Tracing route to sstatic.stackexchange.netdna-cdn.com [69.174.57.102]
over a maximum of 30 hops:

  1     6 ms     3 ms    <1 ms  rtr-core-lc.net.uiowa.edu [128.255.76.1]
  2    <1 ms    <1 ms    <1 ms  rtr-border-lc.net.uiowa.edu [128.255.2.129]
  3    19 ms     4 ms     4 ms  xe-3-2-0.716.rtr.chic.net.internet2.edu [198.49.
182.7]
  4    14 ms    17 ms    17 ms  xe1-1.cr01.ord01.mzima.net [206.223.119.62]
  5     8 ms    16 ms    17 ms  69.174.120.150
  6     6 ms     5 ms     5 ms  69.174.37.2
  7     5 ms     5 ms     5 ms  69.174.57.102

Internet2 is a good thing.

0
1
2

You must log in to answer this question.

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