What is the internet?
More than just websites
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.
As a Rails developer, understanding how the internet works at a fundamental level helps you debug network issues, configure servers, and build applications that work reliably across the globe.
A brief history
The internet wasn't invented in a single moment. It evolved over decades:
| Year | Milestone |
|---|---|
| 1969 | ARPANET: First message sent from UCLA to the Stanford Research Institute (it crashed after two letters: "LO") |
| 1974 | TCP/IP proposed by Vint Cerf and Bob Kahn: the protocols that still power the internet today |
| 1983 | ARPANET switches to TCP/IP: the "birthday" of the modern internet |
| 1989 | World Wide Web invented by Tim Berners-Lee at CERN |
| 1991 | First website goes live |
| 1995 | Commercial internet explodes: Amazon, eBay launch |
| 2004 | Ruby on Rails released by DHH |
| Today | ~6 billion internet users (ITU, 2025), over a billion websites |
The internet is decades older than the web. Email, file transfer (FTP), and remote login existed long before anyone had a browser.
The physical internet
The internet feels magical and invisible, but it's built on very physical things:
Cables
The backbone of the internet is fiber optic cables: thin glass strands that carry data as pulses of light, at about two thirds of light's speed in a vacuum.
flowchart TB
A["Your computer"] -->|"Ethernet / WiFi"| B["Home router"]
B -->|"Copper or fiber"| C["ISP local exchange"]
C -->|"Fiber optic"| D["ISP regional hub"]
D -->|"Fiber optic backbone"| E["Internet exchange point (IXP)"]
E -->|"Submarine cables, across oceans"| F["Another country's network"]
There are over 500 submarine cables crossing the oceans right now, some stretching thousands of kilometers across the Atlantic and Pacific. When you visit a website hosted in another country, your data physically travels through these cables.
Data centers
Web applications (including Rails apps) run on servers in data centers: warehouses full of computers with redundant power, cooling, and network connections.
When you deploy a Rails app to a hosting provider, your code runs on a physical server in one of these data centers.
Internet exchange points (IXPs)
IXPs are physical locations where different networks connect to each other. They're like highway interchanges: they allow traffic to flow between networks efficiently without going through unnecessary hops.
How devices connect: ISPs and the network of networks
The internet is not one single network: it's a network of networks. These networks are connected through a hierarchy:
Tier 1: the backbone
A handful of massive networks (like AT&T, NTT, Lumen) that form the internet's backbone. They connect directly to each other through peering agreements: no one pays anyone; they just agree to exchange traffic.
Tier 2: regional networks
Larger ISPs that buy transit from Tier 1 networks and sell to smaller providers and businesses.
Tier 3: local ISPs
Your home internet provider. They buy connectivity from Tier 2 networks and sell it to consumers.
flowchart TB
subgraph T1["Tier 1 backbone"]
ATT["AT&T"] <-->|"peering"| NTT["NTT"]
LUM["Lumen"] <-->|"peering"| TEL["Arelion"]
end
T1 --> R1["Tier 2: regional ISP"]
T1 --> R2["Tier 2: regional ISP"]
R1 --> Y["Tier 3: your ISP"]
R2 --> S["Tier 3: their ISP"]
Y --> PC["Your PC"]
S --> SRV["Their server"]
When you visit a website, your data may travel through several of these networks to reach its destination.
Packets: how data travels
The internet doesn't send data as a continuous stream. Instead, it breaks data into small packets: like cutting a long letter into numbered postcards.
Original data: "Hello, I am learning Rails and TCP/IP!"
Packet 1: "Hello, I a" → Sequence #1
Packet 2: "m learning" → Sequence #2
Packet 3: " Rails and" → Sequence #3
Packet 4: " TCP/IP!" → Sequence #4
Each packet contains:
- Source address: Where it came from
- Destination address: Where it's going
- Sequence number: Its position in the original data (TCP adds this)
- Payload: The actual data chunk
- Checksum: Error detection
Why packets?
| Advantage | Explanation |
|---|---|
| Efficiency | Multiple conversations share the same wires simultaneously |
| Resilience | If one path is congested, packets can take different routes |
| Error recovery | If one packet is lost, only that packet needs to be resent |
| Fairness | No single transfer can monopolize the network |
This is called packet switching, and it's the fundamental design choice that makes the internet work. Before the internet, telephone networks used circuit switching: a dedicated line for each call. Packet switching is far more efficient.
Protocols: the rules of communication
For all these devices and networks to communicate, they need agreed-upon rules. These rules are called protocols.
Think of protocols like human communication conventions:
- Language: Both parties must speak the same language
- Turn-taking: Don't talk over each other
- Acknowledgment: Nod or say "uh-huh" to confirm you're listening
- Error handling: "Could you repeat that?"
The internet uses a stack of protocols, each handling a different concern:
flowchart TB
A["Application layer — what to send<br>HTTP, HTTPS, FTP, SMTP, DNS<br>your Rails app lives here"]
T["Transport layer — how to deliver<br>TCP, UDP<br>reliable or fast delivery"]
I["Internet layer — where to send<br>IP (IPv4, IPv6)<br>addressing and routing"]
L["Link layer — the physical medium<br>Ethernet, WiFi<br>the actual wires and signals"]
A --> T --> I --> L
This is the TCP/IP model: we'll explore each layer in detail throughout this course.
The internet vs. the web vs. other services
The internet is the infrastructure. Many services run on top of it:
| Service | Protocol | What It Does |
|---|---|---|
| World Wide Web | HTTP/HTTPS | Websites and web apps (Rails!) |
| SMTP/IMAP/POP3 | Sending and receiving email | |
| File Transfer | FTP/SFTP | Uploading/downloading files |
| DNS | DNS | Translating domain names to IPs |
| Streaming | RTMP/HLS | Video and audio streaming |
| Gaming | UDP-based | Real-time game communication |
| SSH | SSH | Secure remote server access |
As a Rails developer, you'll primarily work with HTTP/HTTPS, but you'll also use SSH (to access servers), DNS (to configure domains), and SMTP (to send emails from your app).
Why this matters for Rails development
Every Rails concept is built on internet fundamentals:
| Internet Concept | Rails Connection |
|---|---|
| IP addresses | request.remote_ip, server binding |
| Packets | Every HTTP request/response is broken into packets |
| TCP connections | Puma manages TCP connections for your app |
| Ports | Rails dev server runs on port 3000 |
| Protocols | HTTP is the protocol Rails speaks |
| DNS | Your domain name points to your server's IP |
When something goes wrong (a timeout, a connection refused, a DNS error) understanding these fundamentals helps you diagnose the problem instead of guessing.
Summary
| Concept | Key Point |
|---|---|
| The internet | A global network of networks, not the same as the web |
| Physical infrastructure | Fiber optic cables, data centers, submarine cables |
| ISP tiers | Backbone (Tier 1) → Regional (Tier 2) → Local (Tier 3) |
| Packets | Data broken into small numbered chunks for efficient delivery |
| Packet switching | Multiple conversations share the same wires |
| Protocols | Agreed-upon rules for communication (TCP/IP stack) |
| TCP/IP model | Four layers: Link, Internet, Transport, Application |
| Web vs Internet | The web (HTTP) is just one service running on the internet |
Keep going with lesson 2
IP addresses and packets
Explains IPv4 and IPv6 addresses, CIDR prefixes, private ranges, NAT, IP headers, TTL and how routers forward packets.
A free account also gives you the quizzes, your progress and notes, and the discussion.