Internet fundamentals (TCP/IP)
This course explains how the internet carries data, with each concept tied to Rails development. It starts with the physical network, ISP tiers, packets and protocols. It then covers IPv4 and IPv6 addresses, NAT, TTL and routing, followed by the four layers of the TCP/IP model and encapsulation. TCP handshakes, acknowledgments, flow control and congestion control come next, then UDP and QUIC. The final lessons cover ports, sockets, Unix sockets, connection pooling, common network errors and a bottom-up debugging routine.
What you'll learn
- ✓How packets, routing and IP addressing move data across networks
- ✓The four layers of the TCP/IP model and how encapsulation works
- ✓How TCP provides reliable, ordered delivery with handshakes and acknowledgments
- ✓When UDP fits better than TCP, and how QUIC builds on UDP
- ✓How ports and sockets let Puma, PostgreSQL and other services share one machine
- ✓How to read errors like ECONNREFUSED and debug with ping, nc and curl
What is the internet?
The internet is not the web. The web (websites, HTML, browsers) is just one application that runs on top of the internet. The internet is the global network infrastructure that connects billions of devices: and it's the foundation everything else is built on.
Read the full lesson free →Curriculum
7 lessonsWhat is the internet?
Covers the internet's history, physical cables, ISP tiers, packet switching and the protocol stack, separating it from the web.
IP addresses and packets
Explains IPv4 and IPv6 addresses, CIDR prefixes, private ranges, NAT, IP headers, TTL and how routers forward packets.
The TCP/IP model
Walks through the link, internet, transport and application layers, encapsulation, and how the model compares with OSI.
TCP: reliable delivery
Describes the TCP handshake, sequence numbers, retransmission, sliding windows, slow start, connection teardown and related Rails errors.
UDP: fast and simple
Compares UDP with TCP and shows where UDP fits: DNS, streaming, gaming, StatsD metrics, and QUIC for HTTP/3.
Ports and sockets
Covers port ranges, ephemeral ports, the socket lifecycle in Puma, port conflicts, inspection commands and Unix domain sockets.
TCP/IP in Rails development
Connects TCP/IP concepts to Rails: local requests, database pools, network errors, a debugging ladder and production configuration.