# Worker (/academy/worker)



The waiter should not also be in the basement folding laundry.

A **worker** is a small program with one errand. The HTTP handler takes the click and answers. The worker sends the mail, talks to the slow [API](/academy/api), chews a file, writes the summary. Then it is done.

You will hear the word in three hallways. Do not mash them.

* A **queue consumer** — a back-office person who pulls the next [job](/academy/job) off a [queue](/academy/queue).
* A **Cloudflare Worker** (or any [edge](/academy/edge) isolate) — a tiny [serverless](/academy/serverless) script at the door.
* A **web worker** — a helper thread in the browser so the tab does not freeze.

Same shape: one job, then out of the way. Different building.

At a hackathon the tell is a spinner that has nothing useful to show. If the user is waiting for work they do not need on screen, you wanted a worker and a line, not a fatter request handler. Signup can return "you're in." Welcome email can land thirty seconds later. The pitch does not care.

When the hallway floods — forty signups, forty receipts — you do not rewrite the [frontend](/academy/frontend-backend). You run more copies of the same small program. That is the whole scaling story people dress up with logos.

create-hackhaton-space-stack will give you routes that answer people. Workers are what you add when "answer people" and "do the slow thing" start punching each other. The [CLI](/academy/cli) scaffolds the window. You decide what happens behind the wall.

**What this unlocks**

Once you can name the specialist, you stop stuffing every leftover into the request. The [API](/academy/api) stays a window. The worker is the person behind the wall who only ever does one ticket. Cheap. Focused. Disposable. Need a hundred? Spin a hundred. Need none? Run none.

The dining room stays open. The laundry finishes when it finishes.
