Card 01/ 11

ConceptDifficulty: Beginner2 min

The Building Blocks of a Web System

Six parts, each placed where a request passes through it.

A web system is built from six kinds of part, and each does one job for a request on its way through. DNS finds the address, a CDN serves files from nearby, a load balancer spreads requests, application servers run the code, a cache remembers recent answers, and a database keeps what must survive. Knowing the job of each part is what lets you say which one a design is missing.

The parts a request can pass through, each with its one job

Reading the map. The browser first asks DNS, the Domain Name System, for the address of the site's name. Images, scripts and stylesheets come from a CDN, a content delivery network of servers spread around the world. Everything that needs the application's code goes to a load balancer, a server that passes each request on to one of several application servers. Those servers check a cache, a fast store of recent answers kept in memory, and fall back to the database, which holds the data for good.

Why the parts are separate. Each part fails, grows and is replaced for different reasons. You add application servers when requests climb, a cache when the same reads repeat, and a CDN when readers are far away. A design that names each part by its job lets you add exactly the one the load calls for, and nothing else.

Not every system needs all six. A small internal tool can be one server and one database, with DNS in front. The map is the full set a design picks from, not a checklist every design must fill. Most of the rest of this subject is about when to add each part, and what each one costs.

Where each is taught. DNS, the CDN, application servers and the database each have their own card in this topic. The load balancer and the cache are large enough to get topics of their own.

So when you read or draw a design, name each part by the one job it does, and look for a job that no part covers.

← → move through sections and cards