Anycasting anyone?

[Thanks Sam for the idea for this entry] Ever heard of IP Anycasting? Thanks to my recent change from godaddy (frowny face and no link) to dnsmadeeasy (happy face and they get a link) I’m now using a DNS provider that provides anycasting. What is it and should you care?

IP Anycasting is assigning the same IP address to multiple instances of the same service on strategic points in the network. For example, if you are a DNS provider, you might have servers in New York, London and Los Angeles with the same IP address. Then when a surfer in San Diego (about 80 Miles South of Los Angeles) makes a request to your DNS system the server in Los Angeles answers and saves the network from having to route traffic to New York or London.

Anycasting is generally used to distribute load geographically and to mitigate the effect of distributed denial of service attacks. It’s been used by the F root server since November 2002 and has saved good ole F from getting taken down by several DDoS attacks.

I was using dnspark.net a couple of years ago and we had a few hours of down-time while they were hit by a DDoS attack – so it’s not as uncommon as you think. [They obviously don't use anycasting]

Anycasting is suitable for DNS because DNS uses a connectionless session layer protocol called UDP. One packet is sent, a response is received and hey, if the response isn’t received the client just tries another DNS server. [This occurs in the vast majority of DNS queries. There are a small number of exceptions where DNS uses TCP.]

Anycasting is not ideally suited for TCP connections like web browser-server communication because TCP is connection oriented. For example, TCP requires a 3 way handshake to establish the connection. If the network topology changes and one packet is sent to the Los Angeles server and another is sent to New York it breaks TCP because the New York server doesn’t know about the session that Los Angeles has started establishing.

That’s the theory anyway, but if the network topology stays reasonably stable and you don’t mind a few sessions breaking when the topology does change then perhaps you’ll consider using Anycasting with your web servers. But don’t get too creative and launch a content delivery network. Akamai might sue you and they’ll probably win. They own patent No. 6,108,703 which covers a “global hosting system” in which “a base HTML document portion of a Web page is served from the Content Provider’s site while one or more embedded objects for the page are served from the hosting servers, preferably, those hosting servers near the client machine.” Akamai just won a case against competitor Limelight for violating that patent and the case is now heading to the appeal courts.

There are other protocols that are connectionless and therefore well suited for Anycasting like SNTP and SNMP but there isn’t much demand for these because they’re network management protocols and don’t experience the massive load that more public protocols like DNS, SMTP and HTTP get.

Deploying an anycast network is not something you’re likely to consider in the near future unless you’re eBay or Google, but outsourcing some of your services like DNS to an anycast provider is something that’s worked well for me and might work for you.

10 thoughts on “Anycasting anyone?

  1. magnificent issues altogether, you simply gained a
    logo new reader. What may you suggest about your post that you made some days
    in the past? Any positive?

  2. According to Pre – Sonus, you can daisy chain up to four Fire – Studio Projects or Fire
    - Studio Tubes together in any combination. Pro Tools, Cubase, Nuendo, SONAR, Acid, Digital
    Performer, & Logic. A disadvantage is that
    a variable file, unlike a fixed-size file, may become
    fragmented and cause even more hard drive activity.

  3. Hey I know this is off topic but I was wondering if you knew of any widgets I
    could add to my blog that automatically tweet my newest twitter updates.
    I’ve been looking for a plug-in like this for quite some
    time and was hoping maybe you would have some experience
    with something like this. Please let me know if you run
    into anything. I truly enjoy reading your blog and I look
    forward to your new updates.

  4. Greetings, There’s no doubt that your site could be having web browser compatibility issues.
    When I look at your web site in Safari, it looks fine however,
    if opening in I.E., it has some overlapping issues.
    I merely wanted to give you a quick heads up! Besides that, excellent
    site!

  5. Interesting. In my defense I wasn’t suggesting they use anycasting, I was suggesting they’ll sue you for using anycasting to compete with them. ;)

    I googled around a bit and couldn’t find out much about the algorithm they’re using and I can’t really stomach reading their patent filing this morning. If you have any more info on how it works I’d love to hear it. The reading that I did suggests their target market is delivering large files or streaming media. In that case a second or two more latency on the dns lookup isn’t going to matter much for them – it’s really about getting the server delivering the content as close geographically to the user as possible.

    Just speculating here, but you might be able to use DNS anycasting to build a CDN if you had a network of DNS servers with the same IP’s spread across the globe and answering differently depending on which one you ask. So the Sydney Australia server will answer with an IP in Sydney when asked about content.mynetwork.com and if you ask the server in Los Angeles it answers with a Los Angeles IP for content.mynetwork.com.

    That may play havoc with DNS in general, but if round-robin works I don’t see why that shouldn’t.

  6. Nice article Mark, but you’re wrong about anycasting relating to Akamai. Akamai does not even use Anycast. They use a tiered DNS system so that they know the DNS resolver and use 2 tiers of CNAME’s to best serve the eyballs.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.