Networking & Protocols (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)
TCP Flow Control vs Congestion Control: Sliding Window, BBR, and CUBIC.
senior Levelnetworking-protocolsAdvanced Internals
In Simple Words:
- Flow Control (End-to-End Receiver Protection): Prevents a fast sender from overwhelming a slow receiver's memory buffer. The receiver advertises its available buffer space in the TCP header via the Receive Window (
rwnd). - Congestion Control (Network Protection): Prevents senders from overwhelming the shared routers across the global internet:
- CUBIC (Packet-Loss Based): Increases sending rate until a packet drops, then cuts transmission window in half. Flawed on modern high-speed long-distance fiber networks.
- BBR (Bottleneck Bandwidth and RTT by Google): Measures actual network throughput and round-trip time, pumping data at the exact bottleneck bandwidth without causing packet drops or bufferbloat.