Networking Essentials hard
In WebRTC (P2P Mesh), why is a STUN server required?
- A To allow a client to discover its true public-facing IP address and port mapping; since internal 192.168.x.x addresses are not globally reachable, peers must know this public identity to connect.
- B To act as a high-bandwidth relay that proactively tunnels and re-transmits the entire encrypted video stream between two physical peers that are unable to establish a direct connection.
- C To implement a mandatory system-level encryption layer that prevents any intermediate internet service provider from performing deep-packet inspection on the P2P traffic.
- D To maintain a synchronized global database of all active call participants, ensuring that the mesh network can be properly reconstructed if a single user suddenly disconnects.
Answer: A. To allow a client to discover its true public-facing IP address and port mapping; since internal 192.168.x.x addresses are not globally reachable, peers must know this public identity to connect.
Most internet users are 'hidden' behind a router using NAT. Your computer might think its address is `192.168.1.5`, but that address is useless to someone in another city. A STUN (Session Traversal Utilities for NAT) server is like a mirror: you send it a packet, and it replies with 'I see you coming from public IP 8.8.4.4 on port 5001'. You can then give this public 'coordinate' to your peer. STUN is fast and cheap because it only helps with discovery. If both peers are behind very strict firewalls and still can't connect, they must fall back to a TURN server, which actually relays all the data, making it much more expensive to run.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- What is the downside of enabling 'Sticky Sessions' (Session Affinity) on a Load Balancer?
- What is the fundamental difference between a Network Switch and a Router?
- In Cloud Networking (AWS), what is the limitation of VPC Peering compared to a Transit Gateway?
- Which protocol is ideal for real-time multiplayer gaming positions or Voice over IP (VoIP), and why?
- What is the purpose of the 'Time To Live' (TTL) field in an IP packet?
- In high-performance Data Center networks, what is 'Head-of-Line Blocking' (Switch level)?