OSI Model
A conceptual framework used to understand how different networking protocols interact.
Detailed Explanation
The OSI (Open Systems Interconnection) model has 7 layers: 1. Physical, 2. Data Link, 3. Network (IP), 4. Transport (TCP/UDP), 5. Session, 6. Presentation, 7. Application (HTTP). While the actual TCP/IP stack is slightly different, the OSI model is the universal language for engineers to describe where a networking issue or technology sits.
Quick Summary
The OSI model is a 7-layer conceptual map of how data moves across networks. The real internet uses TCP/IP, which loosely maps to it, but OSI is the shared vocabulary engineers use to describe network problems.
Key Takeaways
- The 7 layers (bottom-up): Physical, Data Link, Network, Transport, Session, Presentation, Application.
- Layer 3 (Network) = IP. Layer 4 (Transport) = TCP/UDP. Layer 7 (Application) = HTTP/DNS/etc.
- "Layer 4 load balancer" vs "Layer 7 load balancer" is the most common practical use of these labels.
- Layers 5 and 6 are largely theoretical, modern protocols collapse them into the application or TLS.
- OSI's value is shared vocabulary, not exact correspondence to real-world stacks.
When to use it
- Communicating with networking and SRE teams ("this looks like a layer-4 issue, not a layer-7 issue").
- Choosing between L4 and L7 load balancers based on whether you need protocol-aware routing.
- Diagnosing failures by walking down layers: is DNS resolving? Is TCP connecting? Is TLS negotiating? Is HTTP returning?
- Studying for certifications (CCNA, AWS networking) where the model is testable.
Common Mistakes
- Treating OSI layers as strict separation in real protocols; QUIC, for example, blurs transport and presentation.
- Asking "which OSI layer is HTTP/2 in?", Application (7), but with multiplexing logic that's transport-flavored.
- Memorizing layers without using them; the vocabulary only matters if you can apply it to debugging.
OSI Model, Frequently Asked
What's the difference between L4 and L7 load balancers?
L4 routes by IP and port, it doesn't decrypt or read the request, just forwards bytes. L7 routes by HTTP details (path, host, headers), slower but lets you do path-based routing, header-based A/B tests, and request rewriting. Most modern systems use L7 unless raw throughput is paramount.
Do I really need to know all 7 layers?
No, most working engineers operate at 3, 4, and 7 (IP, TCP/UDP, application). Knowing where a problem sits is what matters; the canonical names are just a way to talk about it.