EASYwalkthrough
Consistent Hashing in CDNs
Akamai's 1997 paper introduced consistent hashing to solve CDN routing. A CDN has 300,000+ edge servers across thousands of Points of Presence (POPs).
With consistent hashing, adding a POP remaps only 1/N of content. Modern CDNs like Cloudflare and Fastly use two-tier consistent hashing: the first ring maps content to a POP (geographic routing), the second maps to a server within the POP (load balancing).
“With modular hashing, adding one POP reshuffles most content, causing a global cache miss storm hammering the origin.”
If one server in a POP fails, only that POP's ring changes. The global ring is unaffected.
Discord routes messages for 200M monthly users via consistent hashing on guild_id. When they add cache nodes, only 1/N of guilds see cache misses.
Trade-off: CDN hashing must account for server heterogeneity, solved by assigning more vnodes to higher-capacity servers.
Related concepts