infrastructure/what-is-a-server-really-a-computer-that-waits-for-questions.md

What is a server, really? A computer that waits for questions

Infrastructure · 10 min read ·

A server isn't a special kind of machine. It's an ordinary computer running a program that waits for someone to ask for something, then answers. Your browser is the client: it sends a request, the server sends back a response.

Follow one request from address bar to finished page, run a real web server in ten lines of Python, and overload a simulated server until it starts refusing people, then fix it with a second server and a load balancer. Along the way: why servers live in data centres, and what "the cloud" really means: renting someone else's computers.

$ ls infrastructure/

see all →
infrastructure/exponential-backoff-why-waiting-longer-between-retries-keeps-a-struggl.md Exponential backoff: why waiting longer between retries keeps a struggling server alive When a server stumbles, every client that failed retries at the same instant, and the second wave can be bigger than the first. Exponential… 5 min read · 27 Oct infrastructure/environment-variables-how-the-same-code-talks-to-a-practice-database-o.md Environment variables: how the same code talks to a practice database on your laptop and the real one online The same program can talk to a practice database on your laptop and the real one on a live website, without a single edit to its code. The… 5 min read · 24 Oct infrastructure/percentiles-why-an-average-response-time-of-235-ms-can-hide-users-wait.md Percentiles: why an average response time of 235 ms can hide users waiting 3 seconds Your dashboard says the average response time is 235 milliseconds, yet some users wait three seconds. Both can be true, because an average… 4 min read · 21 Oct infrastructure/ci-pipelines-how-a-computer-decides-a-change-is-safe-to-merge.md CI pipelines: how a computer decides a change is safe to merge Push a change and a green tick or a red cross appears a minute later. How does a machine decide? It does not understand your code. It reads… 5 min read · 18 Oct infrastructure/rolling-deploys-how-a-website-updates-without-going-offline.md Rolling deploys: how a website updates without going offline How does a busy website switch to a new version without going offline? Not by replacing everything at once. A rolling deploy updates one… 5 min read · 15 Oct infrastructure/cron-schedules-five-fields-that-tell-a-computer-when-to-run-a-job.md Cron schedules: five fields that tell a computer when to run a job Want a computer to run a job at 3 a.m. while you sleep? On Linux and macOS, a program called cron does it, and each job is described by… 5 min read · 12 Oct