What You Need to Know About Anycast Routing

When talking about server routing, streaming and CDNs, the expression anycast is one you frequently bump into. It’s one of those words you already know but can’t explain what it stands for and how it works exactly. To put it simple, it’s a networking technique where the same IP address is attributed to multiple locations (e.g. servers). The network then decides which location to route the traffic to in order to achieve quickest responses at optimal costs.Today we are going to dig a little deeper into it and explain the meaning, basics and main characteristics.

According to Wikipedia, anycast is defined as:

How One AI-Driven Media Platform Cut EBS Costs for AWS ASGs by 48%

How One AI-Driven Media Platform Cut EBS Costs for AWS ASGs by 48%

“A network addressing and routing methodology in which datagrams from a single sender are routed to the topologically nearest node in a group of potential receivers.”

Beside anycast, network addressing systems apply other methodologies as well:

  • Unicast (“one-to-one”) – used when two specific network nodes need to communicate. Each destination address uniquely identifies a single receiver endpoint.
  • Broadcast (“one-to-many”) – traffic gets routed from a single sender to multiple destinations simultaneously in a single transmission. The traffic is then replicated by the network as needed for all eligible network receivers (links).
  • Multicast  (“one-to-unique”) – traffic gets routed from a single sender to multiple specific endpoints simultaneously in a single transmission. Unlike broadcast, it doesn’t touch all nodes. In order to gain access to information, the nodes have to be subscribed to a multicast group.
  • Geocast – information is delivered to endpoints identified by their geographical locations. It’s a specialized form of Multicast which combines with routing protocols for mobile ad hoc networks.
Illustration of Unicast, Anycast, Multicast, and Broadcast communication models.
Image Source

Tweet this: Network routing schemes: unicast, broadcast, multicast, geocast & anycast

Unicast vs Anycast

The vast majority of the network routing out there is executed through unicast schemes. It’s because most of the routing doesn’t require sophisticated solutions. With unicast, every network node is assigned a unique IP address. Routers keep a map of the world’s IP addresses and maintain a logic which aims for the shortest path between nodes. That way a router forwards packets to the next one which is closer to the final destination until the packet finally arrives at the address. With unicast your request will always be routed to a predefined location, a server which responds to a request.

Unicast is the easiest way to run a network, but for specific needs other methods are also implemented. In this article we will focus on the anycast scheme. With anycast routing, multiple locations share the same IP address. They are functioning as mirrors to each other, within globally distributed data centers and server farms. That way when a request is sent to an anycasted IP address, the network automatically reads the request, picks the closest routers and forwards the traffic to the server thus saving time.

You can track the packets’ path by running a traceroute ( tool that displays the route of packets across a network) to any site. It’s a useful tool, similar to ping, as it lists all the transactions between routers, known as “hops”. Every hop represents a transitions of packets between network nodes and the numbers in each line represent three samples of the time, in milliseconds, it takes for a packet to do a round-trip to the particular router. The last line is usually the most important as it shows an estimated the real-world network latency between you and the server. To find out more on how to use traceroute make sure to read this article.

Terminal output showing the traceroute command results to globaldots.com,detailing the hops and response times.

Tweet this: Anycast allows networks to find closest IP destinations and route traffic accordingly

The image above is an example of tracing the request path to .wpenginepowered.com. If you run the same traceroute to .wpenginepowered.com from anywhere in the world, you can see the requests routed to the closest data center.

With unicast you will always get the same IP destination no matter from where in the world you’re accessing the network. Anycast, on the other hand, will allow the network to find the closest IP destination and route the traffic accordingly.

Anycast Advantages

Although it requires a certain level of sophistication to implement, anycast has proven to be the next step in network routing. It’s main benefits are:

  • Performance
  • Resilience
  • Attack Mitigation

Anycast is frequently implemented by CDN providers in their networks. According to an older Cloudflare blog post, they usually answer around 75% of requests from the edge without the need to access the origin, which significantly reduces network latency. Beside improved performance, applying anycast makes the network highly resilient. Considering that network traffic will find the optimal path, even if an entire data center gets brought offline, all of its traffic will automatically reroute to the next closest center.

Futuristic digital network with laptops and data screens.
Image Source

Tweet this: Anycast routing key advantages: Performance, Resilience & Attack Mitigation

Along with performance and resilience, anycast can also be useful for attack mitigation. In most DDoS attacks, compromised  “zombie” computers also known as bots, get recruited into a bot army known as botnet. When a DDoS is launched, the botnet generates massive traffic directed at a single location which means a typical unicasted service can easily become unavailable.

The nature of anycasted networks is that they increase the impacted surface area and absorb  such an attack. A botnet denial of service traffic will be absorbed by each of the data centers. Setting up an efficient anycasted network requires adequate hardware, direct relationships with upstream carriers and tuning of network routes to avoid traffic to “flap” between multiple locations.

Further technical specifics, more materials and deeper insights about anycast are available here.

Conclusion

Beside the previously mentioned technical benefits, some key advantages are to point out from the business perspective. Anycast allows users to have a faster, uninterrupted experience, while enterprises achieve lower administration costs since anycast routes around slow and failed nodes.

Ultimately it comes down to higher customer satisfaction since users are prevented from experiencing slow or unavailable services.

As suggested throughout the article, anycast can be difficult to implement but also provides a great way to improve the performance and resiliency of a network architecture. The security aspect is also significant as it can absorb massive DDoS attacks, which is important for all online endeavors ranging from ISP’s to private enterprises. Anycast is a no-brainer for services with growing user bases that require a system that can handle failures quickly and transparently. CDN is a must-have for CDN’s too as it allows to deliver content to customers faster than with any other routing scheme. If you feel your online assets could use anycast services, or have other web performance related questions, feel free to contact our experts at GlobalDots as they can help you boost your web assets performances.

Latest Articles

How Optimizing Kafka Can Save Costs of the Whole System

Kafka is no longer exclusively the domain of high-velocity Big Data use cases. Today, it is utilized on by workloads and companies of all sizes, supporting asynchronous communication between even small groups of microservices.  But this expanded usage has led to problems with cost creep that threaten many companies’ bottom lines. And due to the […]

29th September, 2024
Migrating Volumez RedHat VMs into Amazon Linux 2 for higher effective discounts rate of Saving Plan

A cloud data infrastructure company relied on extensive use of multiple instance types to test its products. But this made it difficult to optimize costs – a fact which had begun to impact their ability to scale the business.   The GlobalDots team helped the company identify and implement a new infrastructure configuration that both saved […]

19th September, 2024
How Yuki Achieved SOC 2 Compliance 6x Faster

Overview A fast-growing Snowflake optimization platform was missing out on customers because they didn’t have the right data security compliance. Through multiple consultations and extensive vendor-testing, the GlobalDots team selected a solution to provide both tech and human support, helping the company achieve SOC 2 compliance within just 3 months – and win new customers […]

16th September, 2024
Agile Content partners with GlobalDots to revolutionize CDN management ahead of IBC 2024

New partnership between Agile Content and GlobalDots promises to introduce automated multi-CDN solutions, optimizing content delivery and easing provider management for broadcasters worldwide. Amsterdam, Netherlands, September 9th, 2024 – Agile Content, a leading provider of digital TV and video distribution solutions, proudly announces its strategic partnership with GlobalDots, a global leader in cloud performance optimization and […]

Miguel Fersen Director for Iberia and LATAM, GlobalDots
12th September, 2024

Unlock Your Cloud Potential

Schedule a call with our experts. Discover new technology and get recommendations to improve your performance.

    GlobalDots' industry expertise proactively addressed structural inefficiencies that would have otherwise hindered our success. Their laser focus is why I would recommend them as a partner to other companies

    Marco Kaiser
    Marco Kaiser

    CTO

    Legal Services

    GlobalDots has helped us to scale up our innovative capabilities, and in significantly improving our service provided to our clients

    Antonio Ostuni
    Antonio Ostuni

    CIO

    IT Services

    It's common for 3rd parties to work with a limited number of vendors - GlobalDots and its multi-vendor approach is different. Thanks to GlobalDots vendors umbrella, the hybrid-cloud migration was exceedingly smooth

    Motti Shpirer
    Motti Shpirer

    VP of Infrastructure & Technology

    Advertising Services