Page 1 of 1

How a CDN & IPAnyCast Makes DIC Faster Rate Topic: -----

#1 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1875
  • View blog
  • Posts: 20,283
  • Joined: 17-March 01

Post icon  Posted 15 June 2008 - 09:52 AM

As Dream.In.Code has grown, delivering our content faster, and more reliably to countries all over the world has become very important. I'd like to tell you how I've leveraged several new(er) technologies to make DIC as fast and reliable as it is today.


1. Faster DNS Lookups w/ IPAnyCast

If you own a domain, you probably have NS1.YOURWEBHOST.COM and NS2.YOURWEBHOST.COM. Typically, these server(s) are in the same datacenter, or might even be on the same server. Ideally, you want geographically separated servers and no fewer than 2 completely different servers. But why you ask? If my server is down along with my DNS servers, nobody can get to my site anyway. That's true, but wouldn't you like to be able to move your web site to a new host quickly and not have to wait the 2-3 days for your domain to re-propagate?

Enter services like UltraDNS, EasyDNS, DNSMadeEasy, and many others. They provide redundant, geographically separated DNS servers. This keeps your eggs out of one basket (i.e. your web host), and gives you the control to move your site to a new host quickly.

That's great and all, but we can take geographically separated one step further and say "geographically closest". Using IP AnyCast technology, visitors to your site will be routed to the closest geographical DNS server. Dream.In.Code uses DNSMadeEasy which has over 20 servers located around the world. Visitors are routed to the closest (and often quickest) DNS server. This makes the time from "click" to the time the page starts downloading just that much quicker.

Here's an example of IP AnyCast in the US:
Posted Image


2. Content Delivery Network

Content Delivery Networks (CDNs) are nothing new. Big sites have been using the services of Akamai and others for years. But with the popularity of online video and larger file sizes, CDNs are becoming more and more popular (and accessible) for the little guys.

CDNs address 2 major problems. The first being limitations in the browser. Computers are faster, servers are faster, and connections are faster. So why can't we download more than 3 things at once with Internet Explorer? Because IE has a built-in limit to only open 3 simultaneous connections to any 1 host at a time. This is why a couple months ago I moved all the static content on DIC to static.dreamincode.net. This tricks IE in to downloading more things at once. But, this also puts tremendous strain on my web servers. In fact, the server went from handling around 30 HTTP requests/second, to over 60 HTTP requests/second. Moving all the static content to a CDN fixes this.

Posted Image

The second problem CDNs address is distribution. Delivering static content, video, or large files is very resource intensive. A CDN caches that content on multiple Points of Presence (POP) around the world and delivers it using one of many POPs. This allows for almost unlimited scalability. Again, it is possible to take this a step further using IPAnyCast to deliver the content from the closest geographical POP.

Dream.In.Code has been using CDNLayer from SoftLayer (which is ultimately provided by Internap). CDNLayer let's us do what's called "Origin Pull" which essentially pulls the files requested from our web server and caches them on the POPs (as opposed to us uploading every image, CSS, page, etc.). If you look at the source code, you'll notice references to http://http.cdnlayer.com/dreamincode/ this address translates directly to http://www.dreamincode.net/ so any file requested from the CDN is cached and delivered.

Let's take a look at why IPAnyCast (for DNS or a CDN) makes things so much quicker. Below are 2 traceroutes from Europe. One is coming back to Dallas (where the DIC Datacenter is) and the other is going to the CDN (and hitting the London POP):

Attached Image
Attached Image

You'll notice from Europe, it takes 19 hops to get back to our Dallas server. With the CDN, it only takes 10. And the maximum response time is only 32ms compared to 334ms back to Dallas.

So the combination of using IPAnyCasted DNS and an IPAnyCasted CDN speeds up content delivery dramatically, and takes a lot of strain off the web server. Price wise it's not bad either, I'm paying $59.95/yr for the DNS and $20/mo for the CDN (up to 200GB/mo)

You can read more about IPAnyCast here:

http://www.dnsmadeea.../ipanycast.html

And more about the CDN we're using here:

http://www.softlayer...s_cdnlayer.html

Is This A Good Question/Topic? 0
  • +

Replies To: How a CDN & IPAnyCast Makes DIC Faster

#2 ZachR  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 2
  • View blog
  • Posts: 126
  • Joined: 15-June 08

Posted 19 June 2008 - 12:35 AM

Wow, This IPAnyCast is pretty helpful. Thanks again for the post Chris! :D
Was This Post Helpful? 0
  • +
  • -

#3 ozziffied  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 12-March 08

Posted 24 June 2008 - 11:26 PM

openDNS.org let's you put parental features and they even show the status of all of their DNS servers!!
Was This Post Helpful? 0
  • +
  • -

#4 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1875
  • View blog
  • Posts: 20,283
  • Joined: 17-March 01

Posted 28 June 2008 - 10:20 AM

openDNS != the kind of DNS I'm talking about.
Was This Post Helpful? 0
  • +
  • -

#5 colinwood07  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 14-September 11

Posted 15 October 2011 - 03:27 AM

Hello,

Nice information thanks for sharing....
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1