Skip to content

How the internet works: backend foundations

Every time you open a website, or an app on your phone loads data, a lot happens before the response arrives. Your device finds out where the server is, opens a connection, encrypts it, sends the request and waits. This phase is about all of that. You won’t write any code yet: you’ll understand the ground everything else is built on.

Even if backend isn’t your goal, this phase is still for you. It’s the web under the hood: what your browser does every day without you seeing it. If you do frontend, for example, you’ll understand what happens to every request you send, and why it sometimes takes a while or fails.

By the end of this phase you’ll be able to explain, step by step, what happens from the moment you type a URL into the browser until the page appears. Along the way you’ll see:

  • What the backend is and how it differs from the frontend.
  • What a client is, what a server is, and why a server is nothing more than a program waiting.
  • What a protocol is and why the internet works in layers.
  • How two computers find each other: IP addresses, ports, NAT and routing.
  • Why TCP is reliable and UDP is fast.
  • How google.com turns into an IP address.
  • What the HTTPS padlock really protects.
  1. What is the backend
  2. The client-server model
  3. What a protocol is
  4. The TCP/IP model
  5. IP, ports and sockets
  6. TCP vs UDP
  7. DNS
  8. TLS and HTTPS
  9. From URL to page

Many lessons have a Try it in your terminal block with commands you can run on your computer. Seeing things with your own eyes is the best way to make them stick. You don’t need to know how to use the (term) TerminalAn application where you give the computer instructions by typing text instead of clicking. Almost every server is managed this way.Go to definition; we’ll cover it in depth in Phase 1. For now, all you need is to open it, paste a command and press Enter.

  • macOS: press Cmd + Space, type “Terminal” and press Enter.
  • Linux: look for “Terminal” in your applications. On many distributions you can also open it with Ctrl + Alt + T.
  • Windows: we recommend installing WSL, which gives you a Linux terminal inside Windows. Open PowerShell, run wsl --install, restart and open “Ubuntu” from the Start menu. Every exercise in the course is done in that terminal; if something is different, the lesson says so.

Copy this command, paste it into the terminal and press Enter:

Try it in your terminal

Ventana de terminal
echo "Hello, terminal"

What you will see:

Hello, terminal

echo prints back whatever you write after it. It does nothing else, but you’ve just given your first instruction in text.

Some commands wait on purpose, like the servers we’ll start in lesson 2. To stop them, press Ctrl + C. It works the same on macOS, Linux and WSL.

phase-0 · introduction