Cloudflare Calls: millions of cascading trees all the way down
Apr 4, 2024Renan Dincer, Rachel Chen, Felipe Astroza Araya, Kevin Kipp, Kazi Najib

Summary
This post details the technical implementation of Cloudflare Calls, a new WebRTC infrastructure service. It explains how Cloudflare leverages its global network and Anycast architecture to act as a single, distributed SFU. Key technical contributions include: using a single IP address for all WebRTC protocols (DTLS, ICE, STUN, SRTP, SCTP) via Anycast, deploying in all Cloudflare data centers, exchanging signaling over HTTP, managing a single PeerConnection per client, and handling dual-stack networking with L4 load balancing for ICE checks. It also discusses the challenges of DTLS packet processing on separate servers from the signaling API and the use of BGP for dynamic client assignment to the nearest data center.