MaxCDN Blog

How Anycast IP Routing Is Used at MaxCDN

December 5, 2013

There’s often a lot of confusion about how Anycast IP routing works for DNS and HTTP requests. We wanted to highlight the difference between the two scenarios and give a quick background on the technology itself.

AnyCast vs. Unicast IP Addresses

Think of an IP address like a phone number. A traditional (unicast) IP is like a direct line to a set location. In a large city, every police station might have its own phone number. If one department has technical issues (the phone gets disconnected), people can’t get the service they need.

Clearly, this isn’t a good setup for critical infrastructure (for your business, your website is critical infrastructure).

Anycast works like a globally recognized phone number, similar to 911. When you dial 911, the phone network connects you to the closest available Public Safety Answering Point. In California? Use 911. Going to Maine? Use 911. On a cell phone in Hawaii? Use 911.

It doesn’t matter where you are, or which departments are offline: you’ll get the routed to the closest available provider. Service providers can hop on or off the network as their availability changes, and users can keep dialing the same number.

Anycast DNS provides the same benefit for your servers: visitors asking for a certain IP ( are directed to the nearest available server that’s configured to respond to that IP.


  • Speed, speed, speed: Always connects to the closest MaxCDN location

  • Intrinsic load-balancing and DDoS mitigation

  • Matches users and service providers on all continents and locations

  • Did we mention speed?


  • Complexity

Any main reason you wouldn’t use Anycast? Managing the setup.

Just like any other failover system, it takes effort to configure and maintain, updating configurations as servers are added or removed. Lucky for you, we handle the management, so you simply get to enjoy the benefits of low-latency, high-redundancy servers.

Anycast for DNS and HTTP Requests

Let’s see how Anycast works under the hood. When a user makes a request for a file such as, there are two connections:

  • DNS request to the name server: What is the IP address of

  • Object request on the server: What are the contents of image.png?

Without Anycast, these lookups can be inefficient: users could connect to servers that are around the world, instead of the nearest location. (It’s possible to use DNS indirection layers to mitigate the problem, but they shouldn’t be relied on exclusively; at MaxCDN we combine DNS indirection with multiple Anycast networks.)

Anycast for DNS requests

When a user wants to access, they must get the actual IP address using a DNS resolver at their ISP. This resolver could be anywhere on the internet, and it goes up to the authoritative domain to get the IP, return it to the visitor, and cache it for future use.

Our customers often CNAME their domains to us, and we handle DNS resolutions by having a series of Anycast name servers available. When the user’s ISP is resolving the IP address, it’ll be served by our closest name server (wherever it is), providing the lowest latency DNS lookup time. Additionally, we have redundant DNS entries with two providers, who run their own Anycast networks.

Anycast for HTTP requests

Once the user has the IP for, they’ll connect to that address to download a file or webpage. The IP our name server returns in the first step is actually an Anycast IP address.

When a user makes a request to the IP (on port 80, or 443 for SSL), they are connected to the closest location in our network that is announcing that IP, and gets the file.

In short, the user sees a speedup on both DNS lookups and file downloads. Often times, when I tell people that MaxCDN uses Anycast for HTTP requests, they ask how it’s possible. With the right Anycast setup and mix of providers, you can see how.

How Maintenance is Done

Updating servers is one of the tricky parts of managing an Anycast IP infrastructure. We handle this by stopping the announcement of an Anycast IP address for the entire datacenter, until it can be updated and brought online when ready. Bird and Exabgp are great tools for this.

As mentioned earlier, we incorporate a layer of DNS indirection to send users to nearby locations with a Geo database of Asian and Australian networks. We’re currently experimenting other DNS techniques to improve performance and blend multiple Anycast networks.

That’s how things work under the hood. From your customer’s perspective, Anycast simply means your website will respond quickly and maintain high availability.

PS: Tom Daly from Dyn gave a fantastic presentation on DNS performance at Velocity 2012 in SJC.

  • Intead Boston

    You have given great information about IP routing works for DNS and HTTP requests.

    Its very Understandable and helpful…

    • Mike Czarny

      Glad you like it. Be on the lookout for more posts soon.

  • Hoover2630

    I love lovely pikaqiu shoes nike dunk highIn one study, Belgium researchers treated pigs with a variety of nutrients just before sticking them in a transportation simulator (basically a vibrating crate).Blood Is Thicker Than WellbutrinThere was not a surge in use of credit cards nor home refinancings.The two attribute leather constructions, along with large tongues, massive branding, and extra padding.As a result, it is hard to judge if the shoes are excellent.Some users may prefer OpenVPN because of the better encryption, but those users are usually looking for privacy, not for streaming Hulu outside The US.

    Who cares what the stock market is doing the economy is in a dip right now.However, you must be careful in composing your layout and choosing your specific image as these images relate directly to you professional image.Believe in this: the smallest actions add up to something big, everybody’s success in life is a direct mirror to his or her success in small situations.What do you do ?That can be summed up Nike Air Max 2011 in this statement – they used the laws of the court and followed the rules.The one ski-in/ski-out accommodation is in the recently renovated 84-room Sunshine Inn, located in the primary village from the Sunshine Village Vacation resort at an altiude of 7082 feet.

    Any suggestions?You can also automate 95% of your email marketing campaign and follow up system to save a lot of time.In June 1998, near the height of wait-list mania, a Gucci cashmere twin set at $4,045 had 34 people awaiting its arrival in New York, 10 customers had been waiting for three months for a jeweled Fendi purse and 25 people were waiting for $350 sandales Christian Louboutin sandals with Lucite heels.As your business expands you can then buy a trailer and a get a large plastic 55-gallon drum to store the waste oil, then go buy a business license and a magnetic sign for advertising.” Oh What A Relief It Is!

    Simply because you do in no way have to get together to educate yourself regarding include wades upon too much info online all over the your spending department its tempting to learn more about original a bank card that is the fact that definitely the majority of people popular back and forth from the bring to the table for sale ‘ be able to get environment.MLS direct Kick: Watch up to 160 regular season soccer games played by the major leagues.When the smoke cleared, we were left to contemplate “The Decision” and a Miami Sound Machine nightclub atmosphere, where James proclaimed that he and his two new partners in crime would dominate the League and win “not two, not three, not four, not five, not six, and not seven” NBA championships.

    Take protection which involves proper slip on training feasible that.Choose big web stores, where you could see a variety of garments.Source: Finish Line Might Catch Up To FootlockerUnsur desain yangHis principles of fast style trendsetters can consistently information the discovery of new factors and enjoyment even although in the principal place.73 billion ($A7.”West of Memphis”, dirigido por Amy Nike Air Max Classic BW Berg (nominada a un Oscar por “Deliver Us From Evil”), relata el caso de tres adolescentes (Damien Echols, Jason Baldwin y Jessie Misskelley) condenados por el asesinato en 1993 de tres ninos en la localidad de West Memphis, en el estado de Arkansas.

  • James Byrd

    Anicast is better than unicast because anicast is very very speedy and more secure than unicast ,thanks for this informative post..