Compare
Side-by-side on the decisions that recur: TCP vs UDP, HTTP/2 vs HTTP/3, flow vs congestion control, L4 vs L7, forward vs reverse proxy, IPv4 vs IPv6 — with when to choose each.
TCP vs UDPHTTP/2 vs HTTP/3Flow control vs Congestion controlSwitch vs RouterForward proxy vs Reverse proxyL4 load balancing vs L7 load balancingServer-Sent Events vs WebSocketsIPv4 vs IPv6ARP (IPv4) vs Neighbor Discovery (IPv6)Keep-alive (reuse) vs New connection per request
| Flow control | Congestion control | |
|---|---|---|
| Protects | The receiver — its socket buffer must not overflow | The network — routers’ queues must not overflow |
| Signal | Receive window (rwnd) advertised in every ACK | Inferred from loss, duplicate ACKs, RTT growth, ECN marks |
| Who sets it | The receiver, explicitly, from buffer space left | The sender, by algorithm (CUBIC, BBR, Reno) |
| Sender limit | In-flight bytes ≤ rwnd | In-flight bytes ≤ cwnd |
| Typical symptom when it bites | Zero window: transfer stalls while the app is not reading | Throughput sawtooth; collapses under loss |
| Effective window | min(rwnd, cwnd) — whichever is smaller wins | min(rwnd, cwnd) — whichever is smaller wins |
| Choose this when | Diagnose this when the receiver is a slow consumer: window is zero, ss -ti shows a tiny rwnd, backpressure in the app. | Diagnose this when the link is lossy or shared: retransmits climb, cwnd resets, throughput halves under a few percent of loss. |