Anycast: One IP, Many Locations
Anycast announces a single IP address from multiple geographic locations so routers automatically direct users to the nearest server, improving latency and resilience without client changes.
Loading…
Topic
2 posts about Anycast. Every summary links to the original.
See the idea
Anycast announces a single IP address from multiple geographic locations so routers automatically direct users to the nearest server, improving latency and resilience without client changes.
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
Newest first
Fly.io’s fly-proxy, a Rust-based Anycast router, suffered lockups while managing rapidly changing routing state across thousands of servers. An earlier outage came from an if let expression that kept a read lock through both branches, while later regionalization and lazy loading increased write contention in the Catalog. The investigation traced the new failures to parking_lot’s try_write_for wakeup path: after a waiting writer timed out, it attempted to clear WRITER and WRITER_PARKED together even though one bit had already been cleared, and wrapping arithmetic produced the corrupted lock value 0xFFFFFFFFFFFFFFFE. The parking_lot team fixed the defect, after which the lockups did not recur; the team also audited Catalog locking, removed if let patterns and RAII lock guards, and added lock-timing metrics, labeled slow-write logs, and holder tracking.
Anycast lets an operator announce one IP block from multiple locations so routers connect users to a “nearest” location, but a basic setup requires address space and BGP announcements. The described path involves registering with a Regional Internet Registry, acquiring IPv4 through a broker or obtaining an IPv6 block, and checking purchased addresses for transfer eligibility and abuse-list history. It specifies minimum announcement sizes of an IPv4 /24 or IPv6 /48, notes a roughly $25-per-IPv4-address market rate, and estimates cloud holdings using published ranges. An ASN, available free from RIPE according to the text, groups prefixes and enables independent announcements, while BGP details, traffic direction, and failure scenarios are identified as harder areas left for later.
The best engineering reads, once a week.