Wirebook

Wirebook › Lesson 3 of 18

Can a website get tired?

About 7 minutes · hands-on · nothing you type leaves your browser unless a button says so

Websites don't get sleepy, but they can get overwhelmed. A server can only do so much work each second. When more people arrive than it can handle, they start to queue, and if the queue grows forever, things break. Here's how that works, and how sites stay calm.

Run a pretend server

Each dot is a visitor asking for a page. The server can answer a fixed number per second. Drag the sliders and watch the queue.

0waiting in queue
0 msaverage wait
0answered
0told "try later" (429)

How busy is this real server right now?

These numbers come live from the actual little computer that runs this site (one processor, half a gigabyte of memory). They refresh every 15 seconds. They're counts only; nothing about you is collected.

Loading…

Want the full history? See the status page.

Why queues explode

If a server answers 10 requests a second and 8 arrive, it's fine: there's spare time. At 9.5 it's still coping, but every small burst makes people wait a bit longer. At 10.5 the line grows by half a person every second forever. Wait times don't creep up gently; they shoot up as you get close to 100% busy. Engineers try to keep servers well below full for exactly this reason.

Four ways websites stay calm

Grown-up twin: when a site is overloaded or a middleman gives up waiting, see Tooltern’s HTTP 503 Service Unavailable, HTTP 504 Gateway Timeout, 502 Bad Gateway, and HTTP 429 Too Many Requests guides. Anvil’s HTTP status helpers name the codes.

Words from this lesson

Earn your stamp

Get all 3 right to collect the Busy servers & queues stamp. Wrong answers are fine: just try again.

1. A server answers 10 requests a second and 11 arrive every second. What happens?

2. What does a 429 code mean?

3. How does a cache help?

Try another lesson

  1. 4Secret codes: encryption and hashing7 min · interactive
  2. 5What do 404 and friends mean?5 min · interactive
  3. 6How does a message cross the world in a blink?7 min · interactive