Module 02 Review: Network Fundamentals

[!TIP] Study Method: Use the Flashcards to test your “Active Recall”. If you get stuck, go back to the relevant chapter.

1. Interactive Flashcards (Active Recall)

Master the core concepts before moving to the next module.

What is the "Head-of-Line Blocking" problem in HTTP/1.1?
One slow request blocks all subsequent ones on the same TCP connection. Solved by HTTP/2 Multiplexing.
Why UDP for Gaming/VoIP?
UDP prioritizes Latency over Reliability. No retransmissions means no "waiting" for old frames.
gRPC vs REST Speed?
gRPC is faster due to Protobuf (Binary) and HTTP/2 (Persistent/Multiplexed).
Connection Migration?
HTTP/3 (QUIC) uses Connection IDs instead of IP:Port, allowing seamless network switching.
How does BBR Congestion Control work?
It actively probes the network for Max Bandwidth and Min RTT, rather than waiting for packet loss like CUBIC.
Why are L7 Load Balancers slower than L4?
L7 must decrypt TLS, parse headers (User Space), and re-encrypt. L4 just forwards packets in Kernel Space (eBPF).
What is the "Thundering Herd" in WebSockets?
When a server restarts, all clients reconnect at once, DDoS-ing the system. Solved by adding Jitter.
Can Browsers speak raw gRPC?
No. Browsers lack low-level HTTP/2 framing access. You need gRPC-Web and an Envoy Proxy.
Which CLI tool is best for debugging DNS resolution?
dig (Domain Information Groper). e.g., dig google.com.
Which CLI tool debugs SSL/TLS Handshakes?
openssl s_client. Useful for checking certificate expiry and issuer chains.
What is the first step of a Web Request (before TCP)?
DNS Resolution. The browser must resolve the domain to an IP address (via UDP Port 53).
What is "Fanout" in a Chat System?
The process of delivering one incoming message to multiple subscribers (often using Redis Pub/Sub).
What makes QPACK different from HPACK?
QPACK (HTTP/3) allows out-of-order header compression, preventing HOL blocking if a packet is lost. HPACK (HTTP/2) requires strict ordering.
What is gRPC Status Code 0?
OK. Unlike HTTP 200, gRPC uses an Enum where 0 = Success.
What is eBPF/XDP?
A kernel technology allowing sandboxed programs to run in the OS kernel. Used for ultra-fast L4 Load Balancing and packet filtering.
Key benefit of TLS 1.3 over 1.2?
Faster Handshake (1 RTT vs 2 RTT) and removed obsolete insecure cipher suites.
What is "Backpressure"?
A feedback mechanism where a slow consumer tells the producer to slow down (e.g., TCP Window Size = 0).
What is "Idempotency"?
The property where performing an operation multiple times has the same effect as performing it once (e.g., retrying a Payment).
What is MTU?
Maximum Transmission Unit. The largest packet size (usually 1500 bytes). Packets larger than MTU get fragmented.
What is the MTU size and why does it matter?
1500 bytes. Sending larger packets causes IP Fragmentation, where one lost fragment requires retransmitting the whole packet.
What is Nagle's Algorithm vs Delayed ACK?
A "deadlock" where Sender waits for data and Receiver waits for ACK. Fix with TCP_NODELAY.
What is ALPN?
Application-Layer Protocol Negotiation. How TLS negotiates HTTP/2 (h2) support during the handshake.
Why do WebSockets need Sticky Sessions?
Because WebSockets are stateful. If a connection drops, the Load Balancer must send the user back to the same server.
What is Context Propagation (Deadlines)?
Passing the remaining time (Timeout) from Service A -> B -> C to prevent cascading hangs.
What is ICMP used for?
Error reporting (e.g., "Destination Unreachable", "Time Exceeded"). It is a helper protocol for IP.
What is WebTransport?
A modern API over HTTP/3 allowing both reliable streams and unreliable datagrams (like UDP) in the browser.
CUBIC vs BBR Congestion Control?
CUBIC slows down on Packet Loss. BBR ignores loss and models the network based on Bandwidth & RTT.

2. Protocol Decision Matrix (Cheat Sheet)

Requirement Best Choice The "Why"
Public API (Stripe, Twilio) REST / JSON Interoperability. Every language supports JSON.
Internal Microservices gRPC (Protobuf) Extreme speed + Type safety via .proto files.
Real-Time Chat / Games WebSockets True bidirectional (Full Duplex) low latency.
Unstable Mobile Nets HTTP/3 (QUIC) No HOL blocking at L4; Connection Migration.
Video Conferencing UDP / WebRTC Latency is king. Dropping frames is okay.

3. The “Network Warrior” Checklist

Before moving to Module 03, ensure you can explain:

  1. How a packet travels from L4 -> L3 -> L2 (Encapsulation).
  2. Why TCP Flow Control is different from Congestion Control.
  3. Why you need Envoy to load balance gRPC.
  4. How HPACK saves bandwidth by indexing headers.
🏆

Module 02: COMPLETE

You have mastered the foundational plumbing of the Internet.

Proceed to Module 03

Next Module: API and Communication