Mirage CDN
Network fundamentals / field guide 03

How anycast routing works

Learn how a shared service address reaches different network locations, why routing policy matters, and what anycast does not decide.

By Mirage CDN · Updated

Anycast allows a service address to be reachable through multiple network locations. Routing selects a path to one of those locations for a given source. The application can present one destination address while the routing system directs different users toward different service instances. This is a network technique; it is separate from deciding whether an HTTP response is present in a cache.

The distinction is useful when interpreting a CDN map. A station represents a location in the design. A line on that map is an explanation of a possible request path, not a measurement proving where every visitor’s traffic will go.

One address, multiple service instances

RFC 1546 introduced the IP anycast concept as delivery to one member of a group of hosts sharing an address. It distinguishes that behavior from delivery to a specific individual host and from delivery to all members of a group. The destination is shared, but each packet is still forwarded along a selected route.

Imagine a fictional service with locations A and B. Both are candidates for the service address. A user connected through one access network may reach A, while another user reaches B. Naming the service address alone does not tell the application developer which instance answered. That is a question for suitable operational observations.

Write the expected behavior in terms of the service rather than a particular machine: the correct resource should remain available through the published address. If a test instead requires reaching location A specifically, record that as a different test with its own targeting method.

Routing policy selects the path

Interdomain routing uses BGP to exchange reachability information and route attributes. RFC 4271 describes a decision process that includes local policy and route selection. It is not a procedure that calculates physical distance between a visitor and each server. An AS path also represents routing information, rather than a detailed street map of the packet’s journey.

Therefore, describe an anycast destination as selected by routing, rather than promising the geographically closest city. For a developer investigation, write down the source network, address family, observation time, and destination being tested. Those details make a routing report interpretable without turning one observation into a universal claim.

The identifier behind a network’s routing policy is explained in what is an ASN. That article also separates an autonomous system number from the IP prefixes announced by the network.

A catchment can change

RFC 4786 uses catchment to describe the set of users whose traffic reaches a particular anycast node. It discusses the operational relationship between service availability and routing announcements. Advertising reachability is useful only when the service behind that route can perform its intended job.

A route withdrawal can change the available destination choices, but an operator still needs an appropriate health policy. Checking that a router responds and checking that a service can return the intended object are different exercises. Decide which application condition should affect the routing announcement, and document that decision in the operational design.

For a hypothetical rehearsal, deliberately make one test instance unable to serve its fixture. Observe whether the health mechanism detects the condition and whether new requests recover through the intended path. Record the actual result. Do not label a design resilient merely because the architecture diagram contains a second node.

Connections need application-level thought

RFC 7094 examines the interaction between anycast and application behavior. If routing changes during an exchange, packets may reach an instance that does not hold the state established at another instance. The consequences depend on the transport and application, the duration of an exchange, and the implementation’s handling of that state.

This makes failure rehearsal an application task as well as a routing task. Include a new connection, an existing connection, and an interrupted transfer in your proposed test plan. Define acceptable outcomes separately for each. A successful fresh request after a routing change does not establish that an existing transfer continued correctly.

For static downloads, compare the final artifact with the intended release after the recovery exercise. For any client retry mechanism, check that the retry retrieves the intended resource and does not conceal a persistent configuration error. These are suggested validation steps, not a claim that a particular system has passed them.

Anycast does not distribute files

Selecting a node does not populate that node’s cache or establish the application’s release revision. A useful architecture review therefore keeps two diagrams: the routing view and the content-delivery view. Annotate each with the questions it answers, and leave unmeasured behavior explicitly unresolved.

When diagnosing an unexpected response, first establish whether the request reached the intended service. Then inspect the returned representation and the relevant cache behavior. Changing routing policy without knowing which layer failed can complicate the investigation. The pull CDN explanation shows the separate acquisition and cache decisions.

Mirage CDN uses its router network as a foundation for authoritative anycast DNS and DNS steering. Its delivery regions are North America and Europe. The network page lists the 11 edge router cities; router presence does not mean that each object is served through a router. Use the published evidence for the question it actually answers.

Sources

This guide explains technical concepts. For your delivery setup, review the documentation and request an account from our team.

Read the integration docs · Explore more CDN guides