~/VibeHandbook
$39

Chapter 13 · 01

The five places code can live

Almost every hosting product on earth is a variation of one of these five categories. Learn these and the marketing pages stop being confusing.

  • Static hosting — Plain files (HTML (HyperText Markup Language, the page structure), CSS (Cascading Style Sheets, the styling), JavaScript, images) served straight to the browser. No server "runs" your code; it just hands over files. Think of it as a folder on the internet. Because there's nothing to crash and nothing to patch, this is the most reliable thing you can put online. Examples: GitHub Pages, Cloudflare Pages, Netlify, Vercel (static mode).
  • functions — Tiny snippets of code that run on servers physically close to your user, all over the world. They start almost instantly and are great for lightweight logic: auth checks, redirects, small (Application Programming Interface — the doorway one program uses to talk to another) calls. The catch: they run in a stripped-down environment, so not every library works there. Examples: Cloudflare Workers, Vercel Edge Functions, Deno .
  • functions — Code that runs on demand and disappears when idle. You're billed per request, not per hour. You write a function; the platform handles the machines. Great until a single request needs to run for minutes — most platforms cut a function off after a timeout (often 10–60 seconds). Examples: AWS Lambda, Google Cloud Functions, Vercel Functions.
  • Containers — Your app plus its entire environment (the right language version, libraries, system tools) packaged into a portable box called a . The platform keeps that box running. More control, slightly more setup. The one file that defines the box is a Dockerfile, and AI writes those well. Examples: Fly.io, Railway, Render, Google Cloud Run.
  • Virtual machines (VMs) — A whole computer you rent in a data center. You install and manage everything yourself — the operating system, security updates, the web server, all of it. Maximum control, maximum responsibility. Examples: AWS EC2, DigitalOcean Droplets, Hetzner.

Side by side, the five categories trade less to manage for more control as you go down:

        YOU MANAGE LESS  ◀────────────────────────────▶  YOU MANAGE MORE
        cheaper when idle                                more control

  ┌──────────┐  ┌──────────┐  ┌────────────┐  ┌───────────┐  ┌──────────┐
  │  STATIC  │  │   EDGE   │  │ SERVERLESS │  │ CONTAINER │  │    VM    │
  │  files   │  │ function │  │  function  │  │  your box │  │ whole PC │
  ├──────────┤  ├──────────┤  ├────────────┤  ├───────────┤  ├──────────┤
  │ no code  │  │ runs at  │  │ runs on    │  │ stays     │  │ you run  │
  │ runs     │  │ the edge │  │ demand     │  │ running   │  │ it ALL   │
  └──────────┘  └──────────┘  └────────────┘  └───────────┘  └──────────┘
   Pages         Workers       Lambda          Railway        EC2

A rough rule of thumb for cost: the more the platform manages for you, the cheaper it is when nobody's using your app, and the more it does the worrying when everybody is.

Want it offline?

Get the PDF + EPUB + downloadable prompt library + version updates.

$ Get the PDF — $39