AWS · Google Cloud · Azure
Hundreds of services in dozens of regions. Maximum power and flexibility — and a learning curve to match.
CH. 04 The cloud · a planet-sized computer
Not a mystical place. It's millions of computers in buildings around the planet — always on, always connected, rented out by the second. When you want the whole world to reach your app, this is where it goes.
§ 01 The short answer
The cloud is computing you rent instead of own: always-on computers in data centers, with fast connections and public internet addresses, run by companies like Amazon, Google, Microsoft and DigitalOcean. You pay for what you use — often by the second.
“Deploying to the cloud” means copying your app from your laptop (your localhost) onto one of those machines, so anyone can reach it, anytime, even with your laptop closed.
Origin Why “cloud”?
§ 02 Anatomy
From a whole metro area down to the slice your app gets. Each drawing magnifies the highlighted part of the one before it.
§ 03 In motion
Ten messages, five machines, a few thousand kilometers — and it's done in about the time it takes to blink.
§ 04 Shared responsibility
Every kind of cloud is the same stack of layers. The only question is where your job ends and the provider's begins.
§ 05 The speed of light is a budget
Light in fiber travels about 200 km per millisecond — two-thirds of its speed in a vacuum. That sounds instant until you do the math: a round trip from New York to London covers about 11,000 km, so it can never take less than ~56 ms, no matter how fast the servers are.
That's why clouds have regions on every continent, and why you put your app near your users. And it's why localhost feels impossibly fast: its round trip has no distance in it at all.
The orange bar is a live measurement: your browser's round trip to the server hosting this page, just now.
| Trip | Typical round trip |
|---|---|
| Loopback (localhost) | 0.05 ms |
| Same Wi-Fi network | 3 ms |
| Same city | 10 ms |
| New York ↔ Los Angeles | 65 ms |
| New York ↔ London | 75 ms |
| London ↔ Sydney | 260 ms |
| Geostationary satellite | 600 ms |
| You → this website (live) | — |
§ 06 Side by side
Localhost isn't broken — it's just the wrong kind of home for anything that needs to outlive your laptop being open.
| Feature | Your laptop (localhost) | A cloud server |
|---|---|---|
| Stays on 24/7 | No — it sleeps, closes, travels | Yes — by design |
| Reachable from anywhere | No — only from itself (or your Wi-Fi) | Yes — it has a public IP address |
| A real URL like my-app.com | Not practically | Yes — point DNS at it |
| HTTPS for visitors | No | Yes — usually automatic |
| Handles many visitors at once | Barely — it's also your laptop | Yes — add capacity as you grow |
| Who maintains the hardware | You | The provider |
| Cost | Free — you already own it | Pay for what you use; small apps can cost cents a day |
§ 07 The landscape
All of them rent you computers in data centers. They differ in how much they hide from you.
Hundreds of services in dozens of regions. Maximum power and flexibility — and a learning curve to match.
Simple virtual servers and managed databases with predictable pricing. Great when you want a real server without the sprawl.
Push your code; they handle servers, scaling and HTTPS. The default for many web apps.
A managed database, logins and file storage you plug into, instead of running your own backend.
No dashboard at all: an API built for AI coding agents to deploy containers end-to-end, from one sentence. This site runs on it.
Commands, trade-offs and a straight answer for your situation in the deploy guide.
§ 08 FAQ
Computers in data centers that you rent over the internet instead of buying. They stay on all the time, have fast connections and public addresses, and you pay only for what you use.
In data centers: warehouse-sized buildings full of servers, grouped into regions near big cities on every inhabited continent. When you deploy, you usually choose a region close to your users.
Yes — millions of them, with redundant power, cooling, networking and security teams you'd never build yourself, available in seconds and billed by usage. “Someone else's computer” is exactly the point.
They differ in how much you manage. With IaaS you rent virtual machines and manage the operating system and everything above it. With PaaS you hand over your code and the platform runs it. With SaaS you just use finished software, like Gmail.
Localhost only works on your own computer and only while it's on. A cloud server has a public address and never sleeps, so anyone can use your app from anywhere, at any time.
It doesn't have to be. Many platforms have free tiers, bill by the second, and scale idle apps to zero, so a small personal project can cost cents a day or nothing at all. Costs grow with traffic and resources.