Every Python developer calls requests.get()
but almost nobody knows what actually happens
underneath — TCP sockets, 3-way handshakes,
kernel buffers, CLOSE_WAIT bugs, and why
connection pools matter so much.
In this video I build a TCP server from scratch
and show every step that happens between
requests.get() and the response object.
🔍 What You'll Learn:
✅ What a socket actually is (just an integer!)
✅ The TCP 3-way handshake in Python code
✅ Building a TCP server from scratch
✅ TCP states — ESTABLISHED, CLOSE_WAIT, TIME_WAIT
✅ CLOSE_WAIT — the bug that kills production servers
✅ TCP vs UDP — when to use each
✅ What requests.get() does internally step by step
✅ Why connection pools save hundreds of ms
✅ TCP congestion control explained simply
⚙️ Tools — All Free:
Python 3.11+ → python.org
socket module → built into Python
VS Code → code.visualstudio.com
📚 Under the Hood Series:
▶ Part 1 — Python Event Loop → [link]
▶ Part 2 — HTTP/1 vs HTTP/2 vs HTTP/3 → [link]
▶ Part 3 — TCP Internals (THIS VIDEO)
▶ Part 4 — Database Internals → Coming Soon
⏱️ Timestamps:
0:00 - Hook — what happens after requests.get()
0:30 - What a socket actually is
1:30 - TCP 3-way handshake in Python
3:00 - Build a TCP server from scratch
5:00 - CLOSE_WAIT — the bug that kills servers
6:30 - TCP vs UDP with live comparison
7:30 - Every step of requests.get() internals
14:00 - Outro and Part 4 preview
#TCP #Networking #PythonNetworking
#TCPInternals #UnderTheHood #Python
#SocketProgramming #BackendDev2026
#NetworkingTutorial #PythonDeveloper
#TCPSocket #SystemsDesign #WebDev
#BackendEngineering #PythonTutorial2026