System Atlas
the atlas

10 components of a production web app

The ten boxes that stand between a user's click and your database.

the gist

A production web app is not one server — it's a chain of specialized components: DNS, CDN, load balancer, app servers, cache, primary database with read replicas, a message queue with workers, object storage, and monitoring. Each exists to relieve a specific bottleneck, and knowing what each does is the map you reason from in any design discussion.

ANALOGY // Think of a busy restaurant chain: a directory finds the branch (DNS), pre-made items sit near the door (CDN), a host seats you at a free table (load balancer), waiters serve you (app servers), a specials board saves re-asking the kitchen (cache), the kitchen and its recipe book are the source of truth (database), a ticket rail queues orders (message queue), the pantry holds bulk stock (object storage), and a manager watches the floor (monitoring).
living diagram01 / 07
resolveClientbrowser / appDNSname → IPCDNedge cacheLoad balancerdistributeApp serversstatelessCacheRedisPrimary DBsource of truthRead replicasMessage queueWorkersasync jobsObject storageblobsMonitoringmetrics · alerts
01

Client and DNS

It starts with a client — a browser or mobile app — that only knows a domain name like example.com. DNS is the internet's phone book: it resolves that name to an IP address so the client knows which server to actually connect to. Nothing downstream can happen until this lookup returns.

02

CDN at the edge

A content delivery network caches static assets — images, CSS, JavaScript, video — in data centers physically close to the user. Requests for that content are served from the nearest edge instead of traveling to your origin, which slashes latency and removes a huge fraction of traffic from your own servers. It's the cheapest big win in the whole stack.

03

Load balancer

Dynamic requests hit a load balancer, which distributes them across a pool of identical application servers using an algorithm like round-robin or least-connections. It continuously health-checks each server and routes around any that fail, so the system survives individual crashes. This is the component that turns many interchangeable servers into one resilient service.

04

Web and app servers

Behind the balancer sits a fleet of stateless application servers that run your actual business logic — validating input, enforcing rules, and orchestrating calls to data stores. Because they hold no per-user state locally, you can add or remove instances freely to match traffic. This tier is where requests are turned into work.

05

Cache and database

Most requests read far more than they write, so a cache like Redis holds hot data in memory and answers repeated reads in microseconds. The primary database is the durable source of truth, and read replicas carry copies to serve queries in parallel, leaving the primary to handle writes. Together they protect the hardest-to-scale tier from being overwhelmed.

06

Queue, workers, object storage

Slow or non-urgent work — sending email, encoding video, generating thumbnails — is pushed onto a message queue and handled by background workers, so the user's request returns immediately. Large binary files live in object storage rather than the database, which keeps rows small and cheap. This is how a fast-feeling app does heavy lifting out of sight.

07

Monitoring, logging, alerting

Wrapping everything is an observability layer that collects metrics, aggregates logs, and traces requests across services. When latency spikes or error rates climb, alerting pages a human before users notice. You cannot operate what you cannot see, so this component is what turns a pile of servers into a system you can actually run.

the full picture
01

Why a web app is never one box

Ask a beginner to draw a web app and they'll draw a single server: the browser talks to it, it talks to a database, done. That model is correct for a weekend project and completely wrong for anything with real users. The moment traffic grows, that one box becomes a bottleneck, a single point of failure, and an impossible thing to operate safely. A production web application is instead a chain of specialized components, each introduced to relieve a specific pressure the previous design couldn't handle.

The value of memorizing these ten components is that they are the shared vocabulary of system design. Almost every architecture interview, every "how would you build X" discussion, and every real production diagram is some arrangement of exactly these pieces. If you understand what each one does and *why* it earns its place, you can reason about any system by asking which components it needs and how they connect. This is the map; everything else is detail.

02

Getting the request there — DNS, CDN, load balancer

The first three components exist just to get a request to the right place, quickly and reliably.

  • DNS is the naming layer. Users type example.com, but computers route on IP addresses, so DNS resolves the human-readable name into an address the client can actually connect to. It's a globally distributed, heavily cached lookup — and a common failure point, because if DNS is slow or wrong, everything downstream stalls even though the servers are healthy.
  • A CDN (content delivery network) caches static assets — images, scripts, stylesheets, video — in edge locations physically near the user. A request for a logo is served from a city block away instead of crossing an ocean to your origin. This cuts latency dramatically and offloads a huge share of total traffic for almost no ongoing effort.
  • A load balancer sits in front of your application servers and spreads incoming requests across them using algorithms like round-robin or least-connections. It health-checks each backend and quietly stops routing to any that fail, which is what makes horizontal scaling and high availability real.

Together these three form the edge of your system: the parts the outside world touches before reaching your own logic.

03

Doing the work — app servers, cache, database

Behind the edge sit the components that actually compute and remember.

The web/application servers run your business logic: they parse requests, enforce rules, and coordinate calls to data stores. The critical design property is that they are stateless — they keep no per-user data in local memory between requests. That's what lets the load balancer send any request to any server and lets you add or remove instances freely to match load.

Reads dominate most workloads, so a cache like Redis holds hot data in memory and answers repeated reads in microseconds, never touching the database. The primary database is the durable source of truth for structured data, and it's the hardest tier to scale because data must stay consistent. To protect it, read replicas carry synchronized copies that serve read queries in parallel, leaving the primary to concentrate on writes. This trio — cache in front, replicas beside, primary behind — is the standard pattern for surviving read-heavy traffic without melting your database.

04

The heavy lifting — queue, workers, object storage

Not everything should happen while the user waits, and not everything belongs in a database.

A message queue (like RabbitMQ or Kafka) accepts units of work and holds them durably until a worker can process them. When a user uploads a video, the app server drops an "encode this" job on the queue and immediately returns success; a pool of background workers picks the job up and does the slow encoding out of band. This decoupling keeps the request path fast, smooths out traffic spikes, and lets you scale the slow work independently of the web tier. If a worker crashes, the job stays on the queue and is retried.

Object storage (such as Amazon S3) is where large binary files live — images, video, documents, backups. Databases are expensive and slow when stuffed with big blobs, so you store the file in object storage and keep only a small URL reference in the database row. Object storage is cheap, effectively infinite, and pairs naturally with a CDN that serves those files to users. This split keeps your database lean and your media delivery fast.

05

Operating it — monitoring, logging, alerting

The tenth component isn't on the request path at all, yet it's the one that separates a system you *have* from a system you can *run*. Observability is the practice of collecting metrics (numeric time series like request rate, latency, and error percentage), logs (detailed records of what happened), and traces (the path of a single request across many services), then wiring alerting on top so a human is paged the instant something drifts out of bounds.

Without it you are flying blind: you learn about outages from angry users, you can't tell which of ten services is slow, and you fix problems by guessing. With it, you catch a rising error rate before customers notice, pinpoint the failing component from a dashboard, and measure whether a change actually helped.

Put the whole picture together and the request path is a relay: client → DNS → CDN or load balancer → app servers → cache and database, with a queue, workers, and object storage handling the heavy work, and monitoring watching all of it. Real systems don't adopt all ten on day one — you add each component when a metric tells you the current design is straining. But knowing the full set, and the specific job each one does, is what lets you grow a weekend project into something that serves millions without falling over.

what to remember
01

DNS turns the human-readable domain into an IP address so the client knows where to connect.

02

A CDN caches static assets at the network edge, cutting latency and offloading the origin.

03

A load balancer spreads requests across many identical, health-checked app servers.

04

A cache (Redis) and read replicas absorb read traffic so the primary database isn't overwhelmed.

05

A message queue with workers moves slow work off the request path for async processing.

06

Object storage holds large blobs (images, video, backups); monitoring watches the whole system.

check yourself

Quick quiz

Q1

Why put a message queue and workers behind the app servers?

Q2

What is the primary purpose of read replicas?

follow the thread