Reading an architecture diagram
Boxes and arrows stop being intimidating once you know that only three things are ever being drawn.
Every architecture diagram you will ever be shown is made of three ingredients. Once you can name them, you can read any diagram, including one an AI just generated for you.
- Boxes that hold state: databases, caches, file storage. These remember things.
- Boxes that do work: servers, functions, workers. These forget everything between requests.
- Arrows: who talks to whom, and in which direction.
A useful drill: point at any box and ask "if this disappeared for five minutes, what would users notice?". If the answer is "nothing", ask why it is there. If the answer is "everything stops", you have found the part that deserves your attention.
Which boxes remember things?
Those are the ones you cannot casually restart, replace, or scale up. Everything else is comparatively disposable, which is the entire idea behind serverless.
What to remember
- Diagrams contain state, work, and arrows. Nothing else.
- Arrows point at what a thing depends on.
- The boxes that remember are the ones that constrain your options.
Terms in this lesson
Field notes
Loaded from a deliberately slow source. The lesson above was already readable while this was still travelling. That is streaming, and it is the same trick a chat interface uses.
The URL that read everyone’s invoices
An invoice page checked that you were logged in and then loaded whatever id was in the address. Changing the number showed somebody else’s invoice. It was found by a customer who mistyped, not by a review.
Classic IDOR, still extremely common
The key in the client bundle
An API key was placed behind the public environment prefix so it would be readable from the frontend. It worked. It was also visible to every visitor, and was being used by strangers within a week.
Scraped from a public bundle
resolved in 900ms · region iad1
Hide field notes toggles a search param the loader reads. With it off, the slow promise is never created, so nothing streams.