title: Performance degradation using Azure CDN?
body: <p>I have experimented quite a bit with CDN from Azure, and I thought i was home safe after a successful setup using a web-role.</p>
  
  <p><strong>Why the web-role?</strong></p>
  
  <p>Well, I wanted the benefits of compression and caching headers which I was unsuccessful obtaining using normal blob way. And as an added bonus; the case-sensitive constrain was eliminated also.</p>
  
  <p><strong><em>Enough with the choice of CDN serving</em></strong>; while all content before was served from the same domain, I now serve more or less all "static" content from cdn.cuemon.net. In theory, this should improve performance since browsers parallel can spread content gathering over "multiple" domains compared to one domain only.</p>
  
  <p>Unfortunately this has lead to a decrease in performance which I believe has to do with number of hobs before content is being served (using a tracert command):</p>
  
  <pre><code>C:\Windows\system32&gt;tracert -d cdn.cuemon.net
  
  Tracing route to az162766.vo.msecnd.net [94.245.68.160]
  over a maximum of 30 hops:
  
    1     1 ms     1 ms     1 ms  192.168.1.1
    2    21 ms    21 ms    21 ms  87.59.99.217
    3    30 ms    30 ms    31 ms  62.95.54.124
    4    30 ms    29 ms    29 ms  194.68.128.181
    5    30 ms    30 ms    30 ms  207.46.42.44
    6    83 ms    61 ms    59 ms  207.46.42.7
    7    65 ms    65 ms    64 ms  207.46.42.13
    8    65 ms    67 ms    74 ms  213.199.152.186
    9    65 ms    65 ms    64 ms  94.245.68.160
  
  C:\Windows\system32&gt;tracert cdn.cuemon.net
  
  Tracing route to az162766.vo.msecnd.net [94.245.68.160]
  over a maximum of 30 hops:
  
    1     1 ms     1 ms     1 ms  192.168.1.1
    2    21 ms    22 ms    20 ms  ge-1-1-0-1104.hlgnqu1.dk.ip.tdc.net [87.59.99.217]
    3    29 ms    30 ms    30 ms  ae1.tg4-peer1.sto.se.ip.tdc.net [62.95.54.124]
    4    30 ms    30 ms    29 ms  netnod-ix-ge-b-sth-1500.microsoft.com [194.68.128.181]
    5    45 ms    45 ms    46 ms  ge-3-0-0-0.ams-64cb-1a.ntwk.msn.net [207.46.42.10]
    6    87 ms    59 ms    59 ms  xe-3-2-0-0.fra-96cbe-1a.ntwk.msn.net [207.46.42.50]
    7    68 ms    65 ms    65 ms  xe-0-1-0-0.zrh-96cbe-1b.ntwk.msn.net [207.46.42.13]
    8    65 ms    70 ms    74 ms  10gigabitethernet5-1.zrh-xmx-edgcom-1b.ntwk.msn.net [213.199.152.186]
    9    65 ms    65 ms    65 ms  cds29.zrh9.msecn.net [94.245.68.160]
  </code></pre>
  
  <p>As you can see from the above trace route, all external content is delayed for quite some time.
  It is worth noticing, that the Azure service is setup in North Europe and I am settled in Denmark, why this trace route is a bit .. hmm .. over the top?</p>
  
  <p>Another issue <em>might</em> be that the web-role is two extra small instances; I have not found the time yet to try with two small instances, but I know that Microsoft limits the extra small instances to a 5Mb/s WAN where small and above has 100Mb/s.</p>
  
  <p>I am just unsure if this goes for CDN as well.</p>
  
  <p>Anyway - any help and/or explanation is greatly appreciated.</p>
  
  <p>And let me state, that I am very satisfied with the Azure platform - I am just curious in regards to the above mentioned matters.</p>
  
  <p><strong>Update</strong></p>
  
  <p>New tracert without the -d option.</p>
  
  <p>Being inspired by <em>user728584</em> I have researched and found this article, <a href="http://blogs.msdn.com/b/scicoria/archive/2011/03/11/taking-advantage-of-windows-azure-cdn-and-dynamic-pages-in-asp-net-caching-content-from-hosted-services.aspx" rel="noreferrer">http://blogs.msdn.com/b/scicoria/archive/2011/03/11/taking-advantage-of-windows-azure-cdn-and-dynamic-pages-in-asp-net-caching-content-from-hosted-services.aspx</a>, which I will investigate further in regards to public cache-control and CDN.</p>
  
  <p>This does not explain the excessive hops count phenomenon, but I hope a skilled network professional can help in casting light to this matter.</p>
  
  <p>Rest assured, that I will keep you posted according to my findings.</p>