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 globaldots.com. If you run the same traceroute to globaldots.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

4 Common Kafka Installation Errors – And Proven Steps to Avoid Them

Apache Kafka is the platform of choice for real-time data processing, but getting it up and running can feel like an uphill battle.  With high throughput and fault tolerance, companies like Spotify rely on this distributed streamlining platform to deliver seamless services for over 600 million global users – supporting everything from log aggregation and […]

9th February, 2025
4 Proven Ways to Minimize Your AWS MSK Cost

The very tools designed to streamline cloud operations can sometimes stretch budgets thin. One good example is managing the costs associated with Amazon Managed Streaming for Apache Kafka (MSK). While AWS MSK simplifies deploying and scaling Kafka clusters, the costs can stack up if not optimized. Here’s how you can rethink your AWS MSK deployment […]

3rd February, 2025
Rotating Pen Test Vendors Isn’t the Best Approach: Here’s Why

How do organizations ensure their penetrating testing remains insightful and free from complacency? For many years, the answer was vendor rotation — the practice of changing pen test vendors every few years. But does this approach still make sense today? While it once served a crucial purpose, the administrative burden it creates can be significant. […]

30th January, 2025
The Reconnaissance Playbook of a Kubernetes Attacker

As Kubernetes gained widespread adoption in production environments, it became more attractive to attackers. Its distributed and dynamic nature made it a favorite for scalable and flexible containerized applications, but it also introduced some vulnerabilities and misconfigurations that can be exploited. For an attacker looking to exploit a Kubernetes cluster, reconnaissance is a critical first […]

27th January, 2025

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