What You Need to Know About Anycast Routing

GlobalDots
5 Min read

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:

Reduce your AWS costs by over 50%

Discover your Cloud Saving Potential – Answer just 5 simple questions. AppsFlyer, Playtika, Lufthansa, IBM, top leading companies are already using our FinOps services.

Reduce your AWS costs 
by over 50%

“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.
anycast


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.

tracert

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.

rigorous-performance-testing-modern-testing-tools_

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

Cut Big Data Costs by 23%: 7 Key Practices

In this webinar, we reveal a solution that cuts big data costs by 23% and enhances system efficiency - without changing a single line of code. We’ll also explore 7 key practices that will free your engineers to process and analyze data at the pace and scale they need - and ensure they never lose control of the process.

Developer AXE-WEB
15th April, 2024
Project FOCUS: A New Age of FinOps Visibility

It’s easy for managers and team leaders to get caught up in the cultural scrum of FinOps. Hobbling many FinOps projects, however, is a lack of on-the-ground support for the DevOps teams that are having to drive this widespread change – this is how all too many FinOps projects become abandoned on the meeting room […]

Nesh (Steven Puddephatt) Senior Solutions Engineer @ GlobalDots
27th March, 2024
Optimize Your Cloud Spend with a FinOps Maturity Assessment

Achieving FinOps is a tall order: it demands a degree of organizational self-awareness that some companies are constantly battling for. Consider the predicament that many teams find themselves in: while their cloud environments may contain a number of small things that could be optimized, there are no single glaring mistakes that are consuming massive quantities […]

Nesh (Steven Puddephatt) Senior Solutions Engineer @ GlobalDots
27th March, 2024

Unlock Your Cloud Potential

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

Unlock Your Cloud Potential