How to build CDN for your
website

Martin Kulov
Microsoft Regional Director, VS ALM MVP
State of WWW today
 Average page size is 25% bigger
 From avg 626kB up to 784kB
 For just one year!
 Almost 1MB by the end of this year!
Website Users
 Many have broadband network
 Many of them do not
 Mobile users are increasing
 Tablets are going strong
 All users expect page to load in ~2sec
US mobile data traffic
Page Load Time for Mobile
Typical web app today…
 Loads in 10sec
 Have ~80 resources (img, css, js)
 Have just one web server
Webpage Waterfall – Fail
Connection View – Fail
What can you do today?
 Get content closer to users
 Load resources in parallel
 Use Content Delivery Network (CDN)
  aka Edge Caching Network (ECN)
 Or built similar one by yourself
Webpage Waterfall – OK
Connection View – OK
Benefits
 Increased Speed
 Price Optimization
 Load Balancing
Existing CDN
 Microsoft Ajax CDN
 http://www.asp.net/ajaxlibrary/cdn.ashx

 Google Libraries
 http://code.google.com/apis/libraries/

 Telerik Extensions CDN
 http://www.telerik.com/help/aspnet-mvc/web-assets-
  telerik-cdn-support.html
Using On Premise CDN
How web works

                              DNS
           Host
                                           Web Server
                  IP

                          Home.aspx
 Browser
                           HTML
                       gif, jpg, css, js


                  ~ x80     ...
How web works with CDN
                                       Web Server
                        DNS
           Host            Home.aspx


                  IP
                               HTML


 Browser
                         ...


    gif, jpg, css, js

                        Edge Servers
DNS
geoDNS
Netmask ordering
Round robin
IIS
 URL rewrite – response HTML
 Caching – output, kernel
 Static server
 To blob or not to blob – MS Research
 http://tinyurl.com/m5v3wc

 Application Request Routing
DEMO: UrlRewrite and ARR
Using Cloud CDN
Windows Azure CDN

 Move the content closest to clients
 99.9% monthly SLA
 Used by Windows Update, Bing
  Maps…
 Deliver static content
 Deliver streaming media
 22 locations in
  US, Europe, Asia, Australia, and South
Setting up Azure CDN
 Azure Subscription
 Storage account
 Blob container
 Custom domain name
Pricing

 $0.12/GB from Europe and North
  America
 $0.19/GB from other locations
 $0.01/10,000 transactions


 304 requests also generate traffic
 Not enabled by default in IIS
DEMO: Window Azure CDN
Не забравяйте да ни
дадете обратна връзка и да
спечелите смартфон Nokia
и електронен четец Kindle!

How to build CDN for your website

Editor's Notes

  • #24 http://www.azuresupport.com/2010/08/windows-azure-cdn-locations/