Architecture Diagrams
An architecture diagram is a picture drawn to explain a system to a particular audience. Its only job is to communicate.
Architecture isn’t diagrams: good architecture is working software. But a good picture is still the fastest way to give someone a shared understanding of a system, and a bad one is a fast way to give them a shared misunderstanding.
The diagram is not the architecture. It’s a conversation starter about the architecture.
Start with an architectural overview
For most systems the single most useful picture is an architectural overview: one diagram that shows the overall shape of the system. It should include:
- the main structural pattern (layers, services, pipelines, event flows)
- the most important elements inside each part
- the primary interfaces, both between parts of the system and to external systems
- the key users and systems that interact with it
- where it runs: the target cloud services, regions and accounts
- the critical data stores and what lives in them
Don’t worry about strict notation. Borrow symbols that people recognise, from UML or a provider’s icon set, use colour deliberately and add a legend. A rich picture that people understand beats a technically correct one that they don’t.
The best way to use an overview is to talk someone through it. If the diagram can’t survive a five-minute walkthrough with a new team member, it isn’t doing its job.
Cloud diagrams flow left to right
Traditional architecture diagrams were often top-down structures: layers, components and class hierarchies. Because cloud structure is dynamic (things scale, appear and disappear), cloud diagrams are usually more useful when they show the flow of data, left to right, from where a request or event enters the system, through the managed services that process it, to where results end up. Draw what happens, not just what exists.
The C4 model
Simon Brown’s C4 model is a simple, widely used way to draw software architecture at four zoom levels:
- Context: the system as a box, with its users and the other systems it talks to.
- Containers: the deployable or runnable things inside it (applications, functions, databases, queues).
- Components: the major building blocks inside one container.
- Code: classes and functions. This is rarely worth drawing by hand.
Most teams get most of the value from the first two levels. Draw deeper only where there’s real complexity to explain, typically where the architectural profile is high.
Diagrams as code
Diagrams drawn in a separate tool and pasted into a wiki go out of date the day they’re published. Text-based tools such as Mermaid, PlantUML, D2 and Structurizr let you keep diagrams in the repository next to the code, review them in pull requests and regenerate them automatically:
flowchart LR
user([Customer]) --> api[API Gateway]
api --> fn[Order function]
fn --> q[(Order queue)]
q --> worker[Fulfilment service]
worker --> db[(Orders table)]
Some tools can also generate diagrams from Infrastructure as Code or from live cloud accounts. They’re useful for checking what actually exists, but generated diagrams show everything, so they rarely communicate as well as one drawn with intent.
Keep them honest
- Know the audience: an executive, a new developer and a security reviewer need different pictures.
- Few and current beats many and stale. Every diagram you keep is a diagram you have to maintain.
- Date it and say who owns it.
- Link it to the decision records that explain why it looks the way it does.
- Delete what nobody uses. If nobody would notice that a diagram was out of date, it’s not needed.