Hacker News new | ask | show | jobs
by kwindla 1361 days ago
I'd love to know more about

> Calls uses anycast for every connection, so every packet is always routed to the closest Cloudflare location.

Is this true for the UDP media (and data channels) traffic, or just for the initial signaling and connection setup?

If the UDP traffic is all anycast, that's truly impressive engineering work. Bravo!

3 comments

I work on the team that works on Calls. Thank you for the kind words.

It is true, both media and signaling is over anycast and advertised from every Cloudflare location. We manage things like ICE and DTLS state in a distributed way.

Super happy to be part of the super talented team that made this happen!

Is anycast "just" (!) broadcasting different routes for different parts of the internet for the same IP address? I cannot imagine this is trivial to get right at all.
Definitely non-trivial! Deep BGP expertise is required to operate anycast at any significant scale. And RTP/WebRTC media traffic is perhaps particularly tricky, because UDP is so stateless but media servers need to maintain a relatively large amount of state for each "connection."
Speculating here, but I would read this as "anycast" as a concept, where each user is connected to the closest location. versus anycast as in the IP protocol. The complexity far outweighs benefits with routing each UDP packet to different servers within the same session.
Cloudflare uses Anycast for the TCP connections they terminate. See e.g. https://blog.cloudflare.com/magic-transit-network-functions/ or ponder DNS-over-HTTPS to 1.1.1.1

I don't think they've talked much about what happens if the connections gets routed to a different PoP mid-stream.