01.The Peer-to-Peer Paradox
In a standard web environment, browsers are designed to operate as passive clients. They make outbound TCP connections to a public-facing server (e.g. AWS or Vercel load-balancers), fetch content, and close connections.
But what if you want to establish a **direct peer-to-peer (P2P) pipeline** between two browsers (Peer A and Peer B) to stream real-time co-authoring sync commands or voice data?
The NAT and Firewall Blockade:
Most devices do not possess public IPv4 addresses. Instead, they operate inside private networks behind a **Network Address Translator (NAT)** router or corporate firewall. NAT routers block unsolicited inbound packets. Peer A cannot connect directly to Peer B because Peer A does not know Peer B's public router IP, and Peer B's router will discard any incoming data packet that hasn't been explicitly requested from inside the private firewall first.
To resolve this paradox, the W3C and IETF standards defined **WebRTC** (Web Real-Time Communication). WebRTC provides a secure, hardware-accelerated sandboxed protocol allowing browsers to discover public network pathways, traverse firewalls, and maintain direct peer sockets without intermediating servers.