SA-301g · Module 1
Container Diagrams for Real Systems
3 min read
The container diagram zooms into the system box from the context diagram and reveals the major deployable units: web applications, APIs, databases, message queues, and file stores. Each container is something that runs independently — a process, a deployment, a separately scalable unit. The container diagram is the most useful C4 level for architecture discussions because it shows the technology choices and the communication patterns without drowning in implementation detail.
Do This
- Label every container with its name, technology, and responsibility — "Order API (Node.js / Express) — handles order CRUD and validation"
- Show every communication path with protocol and direction — "REST / HTTPS →" between the web app and the API
- Include data stores as containers — they are deployable units with their own scaling and backup requirements
Avoid This
- Show internal classes or modules as containers — containers are deployable units, not code organization
- Omit the technology from container labels — "API Service" tells the reader nothing about the implementation
- Draw communication paths without protocols — the reader cannot evaluate the architecture without knowing how components talk