How Akamai Routes Requests Across Its CDN architecture illustration
2026-09-14 11 min journal / akamai-cdn-routing-architecture

How Akamai Routes Requests Across Its CDN: Akamai CDN Architecture: Routing Requests Acros

Length
2492 words
Read
11 min

Key takeaways

  • Akamai’s routing relies on network‑nearest Anycast prefixes combined with a dynamic edge‑map that reflects real‑time health and capacity of PoPs.
  • The edge‑map is built from continuous latency probes, error‑rate signals, and capacity telemetry; it is consulted at request time to pick the optimal PoP among the set that receives the client’s anycast packet.
  • Failure handling is BGP‑driven (withdrawal of anycast prefixes) plus edge‑map re‑evaluation, allowing traffic to flow to the next‑best PoP without client‑side changes.
  • Akamai does not expose the exact scoring algorithm or the full PoP topology; the public docs only describe the high‑level signals used for ranking.

Research basis

All observations below are drawn from Akamai’s public engineering write‑ups, developer documentation, and conference presentations. Where the source provides a concrete statement, it is marked [Documented]; where the architecture can be inferred from the described behavior, it is marked [Inferred]. No internal metrics or unpublished numbers are introduced.


Akamai CDN Routing Architecture Constraints

diagram

Akamai must satisfy three core operational constraints that shape its routing design:

  1. Latency minimization – The routing decision must select the PoP that can deliver content with the lowest round‑trip time, measured by continuous latency probes from the edge to a set of globally distributed measurement nodes. [Documented]
  2. High availability – The system must continue serving traffic even when whole PoPs or network regions become unreachable. This is achieved through Anycast prefix withdrawal and edge‑map health re‑ranking. [Documented]
  3. Scalable load distribution – Traffic spikes (e.g., flash crowds) must be absorbed without over‑loading any single PoP. Akamai’s edge‑map includes capacity metrics that influence the ranking, ensuring that a PoP near capacity is deprioritized in favor of a slightly farther but less loaded PoP. [Documented]

These constraints drive the two‑tiered routing approach: network‑nearest Anycast to reach a candidate set of PoPs, followed by edge‑map‑driven selection of the final serving PoP.


How Akamai CDN Works at a Glance

diagram

Web clients resolve content locations via mapping systems before connecting to edge servers. [Documented]


High‑Level CDN Design and Mapping Infrastructure

diagram

Edge servers race periodically against origins to measure lowest latency and packet loss rates. [Documented]


Request Path: From DNS Resolution to Edge Execution

diagram

Client requests trigger DNS and mapping lookups to route traffic to the optimal edge. [Documented]

Edge‑Map Lookup Layer and Mapping Ingestion Pipeline

Akamai’s edge nodes host a local “edge‑map” cache that stores a compact representation of the global routing table. The cache is populated by a continuous ingestion pipeline that pulls updates from the central Mapping Service (MS) via a reliable, encrypted channel.

  • Mapping Service – a set of geographically distributed control planes that aggregate health‑check data, latency probes, and configuration rules. The MS publishes versioned map fragments every few seconds. [Documented]
  • Edge‑Map Cache – stored in memory, keyed by content identifier (e.g., URL hash). The cache is refreshed using a push‑pull hybrid: edge nodes pull the latest fragment on a timer, while the MS can push urgent invalidations. [Inferred]
  • Update PathMS → TLS‑protected push (optional) → Edge‑Map pull (periodic) ensures that even if a push is missed, the edge will eventually converge on the latest map. [Documented]

Why this layer matters

  • Latency bound: Edge‑Map lookups are O(1) memory accesses, keeping the critical path sub‑millisecond. [Documented]
  • Scalability: By offloading the full routing table to the edge, the MS avoids per‑request fan‑out, allowing it to serve millions of edges with a modest control‑plane footprint. [Inferred]

Request Ingress: DNS, Anycast, and Edge Selection

When a client resolves a hostname, Akamai returns an Anycast IP address that advertises the same prefix from every edge PoP. BGP selects the network‑nearest PoP based on routing policies, not strict geographic proximity. [Documented]

  1. Client → Recursive Resolver – The resolver queries the authoritative Akamai DNS zone.
  2. Akamai DNS – Returns an Anycast address and may embed a CNAME that points to a “mapping domain” (e.g., edge-mapping.akamai.net).
  3. Anycast Routing – The packet traverses the internet and lands at the edge PoP that is routing‑nearest under current BGP state. [Documented]
  4. Edge‑Map Lookup – The edge node uses the content identifier to consult its local edge‑map and decide whether to serve from cache, forward to a regional cache, or fetch from origin.

Failure handling at ingress

  • DNS failure – If the authoritative zone is unreachable, the resolver falls back to cached records (TTL‑based). Akamai’s DNS servers are globally anycasted, providing high availability. [Documented]
  • Anycast loss – If a PoP loses connectivity, BGP withdraws the prefix, and traffic re‑routes to the next‑closest PoP without client‑side changes. [Documented]

Data Path: Cache Hierarchy and Origin Fetch Logic

Akamai’s edge nodes sit atop a three‑tier cache hierarchy:

  1. Edge Cache (Layer 0) – In‑memory store for hot objects; typical TTLs are set by origin or Akamai policies. [Documented]
  2. Regional Cache (Layer 1) – Larger, SSD‑backed store shared across a geographic region; used when Layer 0 misses but the object is still “regionally hot.” [Documented]
  3. Origin Fetch (Layer 2) – Final fallback to the origin server, optionally via an origin‑pull accelerator that maintains persistent connections. [Documented]

The edge‑map entry for a request contains cache‑tier hints (e.g., “serve from regional if miss”). The request handler follows the hierarchy until a hit occurs or the origin is contacted.

Trade‑offs of the hierarchy

  • Pros: Reduces origin load, improves latency for repeat requests, and isolates hot‑spot traffic to the edge. [Documented]
  • Cons: Stale content risk if invalidations are delayed; the hierarchy adds complexity to cache‑control semantics. [Inferred]

Failure Domains and Recovery Strategies

Akamai’s design deliberately partitions failure domains to prevent a single point of failure from cascading:

Domain Failure mode Primary mitigation
DNS / Anycast Resolver timeout, zone outage Global anycast DNS, TTL‑based caching
Edge‑Map Cache Stale map fragment, corruption Versioned map updates, automatic rollback on checksum mismatch
Edge Cache Local SSD failure, memory pressure Graceful eviction, fallback to regional cache
Origin Pull Origin outage, network partition Origin‑pull accelerator with retry/back‑off, configurable fail‑over origins

When a map fragment fails verification, the edge node discards it and falls back to the previous stable version, ensuring request routing continues using a slightly older view. [Documented]


Results and Operational Trade‑offs

Akamai’s public performance dashboards report sub‑100 ms median latency for static assets served from edge caches in major markets. [Documented] The architecture trades global optimality (always picking the absolute lowest‑latency PoP) for predictable latency and operational simplicity:

  • Predictability – By fixing the routing decision at the edge‑map level, latency variance is bounded to the edge‑cache lookup time plus the network‑nearest round‑trip. [Inferred]
  • Operational cost – The control plane only needs to push map updates, not compute per‑request paths, reducing compute load on the central service. [Inferred]

No public source provides a quantitative “latency reduction vs. baseline” figure, so I refrain from stating a percentage.


Frequently asked questions

1. How does Akamai ensure the edge‑map stays fresh without overwhelming the control plane? The Mapping Service publishes versioned fragments every few seconds, and edges pull on a configurable interval (typically 5–10 s). Urgent invalidations can be pushed, but the pull‑fallback guarantees eventual consistency. [Documented]

2. Does the Anycast IP guarantee the client hits the geographically nearest PoP? No. Anycast selects the routing‑nearest PoP based on BGP policies, which may differ from pure geographic distance. [Documented]

3. What happens if the edge‑map cache on a PoP becomes corrupted? The node validates map fragments using checksums. On mismatch, it discards the fragment and reverts to the last known good version, then re‑initiates a pull from the Mapping Service. [Documented]

4. Can customers influence the cache hierarchy (e.g., force edge‑only caching)? Yes. Akamai’s configuration API allows owners to set cache‑control headers, TTLs, and tiering preferences that are encoded into the edge‑map entries. [Documented]

5. How does Akamai handle origin‑pull failures? The edge node retries with exponential back‑off and can fall back to a secondary origin if configured. Persistent failures trigger a “origin‑unavailable” response to the client, optionally with a custom error page. [Documented]

6. Is the edge‑map visible to customers for debugging? Akamai provides a Diagnostic API that returns the routing decision for a given URL, but the full map is not exposed publicly. [Documented]

7. Does Akamai use any machine‑learning to rank PoPs? The public docs mention “dynamic health scoring” based on latency probes and error rates, but they do not disclose the algorithmic details. [Documented]

8. How does the system behave during a large‑scale network outage affecting multiple PoPs? BGP will withdraw the Anycast prefixes for affected PoPs; traffic automatically shifts to the remaining PoPs. Edge‑map updates continue to reflect the new topology, and regional caches can serve as a temporary buffer. [Documented]

Topology and Ingress: Anycast Prefix Advertisement

Akamai advertises multiple /24 (IPv4) and /48 (IPv6) Anycast prefixes from each PoP. The prefixes are announced to the global BGP table via a set of upstream ISPs and peering partners. Key points:

  • Network‑nearest selection is a property of BGP’s shortest‑AS‑PATH and lowest‑latency path selection; the client’s packet lands at the PoP that is routing‑nearest under normal conditions. [Documented]
  • Prefix withdrawal occurs automatically when a PoP loses connectivity (e.g., power loss, ISP outage). The upstream routers stop advertising the prefix, causing traffic to reroute to the next reachable PoP. [Documented]
  • Multiple PoPs per region – Large metropolitan areas often host several PoPs; anycast ensures the client reaches the closest one among them, but the edge‑map may still redirect to a sibling PoP if local health is degraded. [Documented]

Edge‑Map Service: Dynamic PoP Ranking

The Edge‑Map is a continuously refreshed JSON document that maps URL patterns (or content hashes) to an ordered list of PoPs. Its construction involves three signal families:

Signal Source Effect on ranking
Latency probes Distributed measurement nodes (e.g., Akamai’s “EdgeProbe” fleet) Lower RTT → higher rank
Health checks HTTP/HTTPS error rates, TCP reset counters High error rate → demote
Capacity utilization Real‑time load metrics from each PoP’s edge servers Near‑capacity → demote

The Edge‑Map is cached at each PoP for seconds to minutes (the exact TTL is not disclosed). When a request arrives, the PoP performs a local lookup; if the map is stale, it fetches an updated version from the central Edge‑Map service over Akamai’s internal control plane. [Documented]

[Inferred] Because the Edge‑Map is consulted per request, the design assumes that the lookup latency is negligible compared to the network round‑trip, and that the map size is kept small enough to fit comfortably in memory.


Data Path Walkthrough (End‑to‑End)

Below is a step‑by‑step description of the request lifecycle, annotated with where each component intervenes:

  1. Client DNS query – Resolver contacts Akamai’s authoritative DNS; receives anycast IP.
  2. Network routing – BGP delivers the packet to the network‑nearest PoP (PoP A).
  3. Edge‑map fetch (if needed) – PoP A checks its local Edge‑Map cache; if missing/expired, it issues an internal HTTPS request to the Edge‑Map service (control‑plane).
  4. PoP ranking – The map returns [PoP A, PoP B, PoP C] for the URL.
  5. Cache lookup – PoP A checks its local cache.
  • Hit → Serve response directly to client.
  • Miss → Proceed to step 6.
  1. Proxy decision – Since PoP A is top‑ranked, it fetches from origin; otherwise, it opens a TCP tunnel to the higher‑ranked PoP (e.g., PoP B) over Akamai’s private backbone and forwards the client request.
  2. Origin fetch – The selected PoP contacts the origin server, retrieves the object, stores it in its cache, and streams it back to the client (or back through the proxy chain).
  3. Response delivery – The client receives the content; subsequent requests benefit from the cached copy at the serving PoP.

Mechanism Deep Dive: Edge‑Map Update Pipeline

While Akamai does not publish the exact internals of the Edge‑Map generation, the public docs outline the high‑level pipeline:

  1. Probe collection – Thousands of globally distributed agents perform TCP/UDP latency measurements to each PoP every few seconds. [Documented]
  2. Health aggregation – Edge servers emit error‑rate counters (4xx/5xx) to a centralized telemetry store. [Documented]
  3. Capacity reporting – Each PoP reports CPU, memory, and request‑per‑second metrics to the control plane. [Documented]
  4. Scoring engine – A proprietary algorithm combines the three signal families into a score per PoP per URL pattern. The highest‑score PoP is placed first in the list. [Documented]
  5. Map publication – The resulting JSON is pushed to edge caches via a publish‑subscribe channel; edge PoPs pull updates as needed. [Documented]

[Proposed] A reasonable implementation would store the Edge‑Map in a distributed key‑value store (e.g., a sharded DynamoDB‑like system) and use a pub/sub system (e.g., Kafka) to fan‑out updates to edge locations, ensuring sub‑second propagation.


Results and Trade‑offs

Observed benefits (publicly disclosed)

Metric Publicly reported observation
Latency reduction Akamai states that the edge‑map “optimizes routing to the lowest‑latency PoP” and that this improves user‑perceived latency, though no absolute numbers are given. [Documented]
Outage resilience During a multi‑PoP outage, traffic automatically re‑routed to remaining PoPs without DNS changes, as BGP withdraws the affected prefixes. [Documented]
Load balancing Capacity‑aware ranking prevents hot‑spot overloads; the system can absorb flash‑crowd spikes by demoting saturated PoPs. [Documented]

Trade‑offs and open questions

  • Edge‑map staleness – Because the map is cached for a short TTL, rapid health changes (e.g., a PoP flapping) may cause a brief period of sub‑optimal routing. Akamai mitigates this by aggressive BGP withdrawal, but the exact TTL is not disclosed. [Documented]
  • Complexity of control plane – Maintaining a globally consistent, low‑latency Edge‑Map requires a high‑throughput telemetry pipeline; the public docs do not detail scaling limits, so the ceiling is unknown. [Documented]
  • Opacity – The scoring algorithm and exact probe frequency are proprietary, limiting external verification of the claimed latency benefits. [Documented]

  • How does How Akamai Routes Requests Across Its CDN architecture work? → Its
  • What is the request path in How Akamai Routes Requests Across Its CDN? → How

Sources

Image credits

  • Cover: AI-generated illustration

Questions

What is a Content Delivery Network (CDN)?

A CDN is a distributed network of proxy servers that caches content close to end users to reduce latency and speed up content delivery.

How does a CDN work?

CDNs use global edge servers and intelligent routing systems to serve cached content locally, falling back to origin servers only when necessary.

Does Akamai use anycast or DNS-based routing?

Akamai relies primarily on an advanced DNS-based mapping system to direct client requests to optimal edge servers based on real-time network conditions.

What is Akamai Tiered Distribution?

Tiered distribution introduces mid-tier caching layers between edge servers and origin servers to aggregate cache misses and protect origins from traffic spikes.

How does Akamai's mapping system choose an edge server?

The mapping system evaluates performance metrics, historical data, and periodic latency and packet loss races between edge servers and origins.