One of the complexities of a CDN (Content Delivery Network) is to accurately determine the user’s geographical position. There has been a significant improvement in the use of conventional positioning methods on DNS servers in recent years, but these methods are still not sufficiently accurate, and implementing a stable and integrated structure would face some challenges. ArvanCloud employs Anycast technology to tackle this problem.
Anycast is a method for addressing and routing. In this method, the same IP address is allocated to a group of server nodes which, within a CDN framework, act as a series of servers in different datacenters throughout the world. The traffic sent to this IP address is responded by the topologically closest server to the transmitter of the request. As a result, ArvanCloud IP addresses are simultaneously advertised worldwide, and every user can connect to the closest edge server and get services through the first connection.
ArvanCloud is among a few global CDNs which operates in an integrated way not only on the DNS anycast layer but also based on Anycast routing (BGP Anycast). In this section, conventional routing methods are reviewed first. Then, the anycast routing method is analyzed along with its advantages.
For years, the Internet architecture allowed information (data) to exist only on a single server, which was responsible for responding to all information requests. Such a routing architecture is called unicast. This architecture has two serious problems:
These problems led to the development of a solution called anycasting.
There are three common methods for traffic routing and addressing:
In this case, every system has a unique IP address in the network, and a transmitter sends a specific message matching the IP address of a recipient. In the unicast architecture, no two devices can have the same IP address. Global communications are largely based on unicasting.
In this method, a message is broadcast to an address, and every device existing in the architecture can receive the message even if they have no need for it. Routers forward no IP packets to broadcast destinations in this approach.
In this method, a series of devices become the members of a group, to which a multicast address (a range of reserved addresses) is allocated. Now, all of the member devices can receive the traffic sent from a transmitter to the multicast group address. A widely-used instance of this method includes audio and video casting networks on the Internet.
Anycast routing is not a different routing protocol. It requires no specific capabilities on servers, user systems, or even other pieces of equipment. In fact, anycast is a configuration mechanism. Like unicasting, there are one-to-one links in anycast. In other words, a message is sent by a transmitter to a specific IP address, which has not been reserved for broadcasting or multicasting purposes. In fact, it is an ordinary public address.
Unlike unicasting, the single IP address is allocated to a group of devices rather than just one device. Thus, the allocation of the same address to two or more devices poses no problems in the anycast architecture. As a result, servers of the same IP address can exist worldwide. Each of them is responsible for responding to the users existing in their proximities.
For instance, assume that a specific web service can be provided through three servers in different parts of the world (or a network):
According to this figure, the user-side router determines all access routes to servers through 10.10.5.1 along with the distance and saves them in the routing table. Whenever a user sends a packet to 10.10.5.1, it will be routed through the shortest route.
Anycast routing can be implemented through all routing protocols. It is implemented through the BGP routing protocol on a CDN. For this purpose, server addresses are advertised to the Internet routers through BGP messages, and every router determines its distance from that address. As a result, if users intend to use a specific web service on the Internet, they connect to the closest server and receive the requested information.
Responding to user requests through closer servers can reduce the delay in data access.
With anycast, instead of a single server, there will be multiple distributed servers worldwide. If one server fails, the next closest server will automatically respond to user requests.
Anycast can be employed to place multiple servers in an area to load balance the traffic sent and received by the users existing in that area.
Anycast can be used to distribute a large amount of traffic sent by botnet-affected devices among anycast nodes. Thus, it will be possible to prevent the inaccessibility of a server due to inability to respond to the large number of requests.
With the help of anycast routing, the Internet routers will be able to deal with the problem of user access to web servers through the closest route possible. Therefore, there will be no practical problems in the use of certain methods such as the DNS protocol (caching DNS packets in user-side systems).