Back/How the Internet Works
Lesson 18 min

How the Internet Works

00:00 / 00:00

What is the Internet?

The internet is a global network of billions of computers connected together using a standardized set of rules called protocols. Unlike a single private network, it is a network of networks — every ISP, company, and university operates its own network, and they are all interconnected.

The internet was born from ARPANET in 1969. What started as a US military research project became the backbone of modern civilization.

How Data Travels

When you type google.com into your browser, an enormous invisible journey begins:

  • Your browser asks a DNS server to translate the domain name into an IP address.
  • A TCP connection is established between your machine and Google's server.
  • An HTTP request is sent over that connection asking for the page.
  • Google's server responds with the HTML, CSS, and JavaScript files.
  • Your browser renders those files into the page you see.

Key Concepts You Must Know

  • IP Address — A unique numerical label assigned to every device on a network. Think of it as a home address.
  • DNS (Domain Name System) — The phonebook of the internet. Translates human-readable names like javashark.in into machine-readable IP addresses.
  • Router — A device that forwards data packets between networks, making sure your request reaches the right destination.
  • Packet Switching — Data is broken into small packets, sent independently across the network, and reassembled at the destination.

A Simple Analogy

Think of the internet like a postal system:

  • Your device is your house.
  • IP address is your home address.
  • Packets are individual envelopes in a parcel.
  • Routers are the post offices that forward mail.
  • The HTTP protocol is the language written on the envelope that both sender and receiver understand.
javascript
// A simple Node.js HTTP server — your first step to understanding servers const http = require('http'); const server = http.createServer((req, res) => { res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end('Hello from JavaShark Backend!\n'); }); server.listen(3000, () => { console.log('Server running on http://localhost:3000'); });

Summary

The internet is not magic — it is a set of agreed-upon rules (protocols) and physical infrastructure (cables, routers, servers) working in harmony. In the next lesson, we will go one layer deeper and explore TCP/IP and the OSI model, which are the actual protocols that power everything.

WhatsApp