PlantUML deployment diagrams: blue-green, canary, and rolling deployments
Deployment diagrams describe the physical structure of your software — which servers, containers, and networks it runs on. PlantUML’s deployment view precisely captures servers, containers, network topology, and deployment strategies.
What is a Deployment Diagram
A deployment diagram shows how software is physically deployed — which servers/containers it runs on, whether there’s a load balancer, where the database lives. It answers “how does this system actually run.”
Compared to:
- Component diagram: describes relationships between software modules (logical structure)
- Deployment diagram: describes hardware/container/network topology (physical structure)
Use cases: architecture design reviews, ops handoffs, incident postmortems, technical spec documents.
Minimal Deployment Diagram
1 | @startuml |
node= physical node (server/container)component= software component-->= connection arrowdatabase= database node (special shape)
Blue-Green Deployment
Blue-green uses two identical production environments (blue + green). Traffic switches atomically at the load balancer; rollback = switch back.
1 | @startuml |
Key points:
- Both environments are identical except for version
- Switch happens at the load balancer (change upstream config)
- Switch is atomic — users don’t notice
- Rollback = switch traffic back to old environment
Canary Release
Canary gradually shifts traffic from old to new version — 5% first, observe, then expand.
1 | @startuml |
Key points:
- Traffic split at the load balancer (Nginx upstream weight)
- Monitor: error rate, latency, business metrics
- Promote criteria written in diagram as notes for the team
- Safer than blue-green — canary failure only affects 5% of users
Rolling Deployment
Rolling upgrades replace instances one at a time within the same pool, managed by Kubernetes ReplicaSet:
1 | @startuml |
Key points:
- Some Pods are old version, some are new during rollout
- Advantage: no double the resources needed
- Disadvantage: version coexistence period has compatibility risks
- Kubernetes default: 25% maxUnavailable + 25% maxSurge
Kubernetes Deployment Topology
1 | @startuml |
Notation Best Practices
Node hierarchy
1 | Cloud Provider > Region > VPC/Namespace > AZ > Node > Pod > Container > Process |
Draw to Pod level (container granularity) — don’t go to process level.
Connection line semantics
1 | @startuml |
Color semantics
| Color | Meaning |
|---|---|
| Red dashed | New version / Canary |
| Green dashed | Standby environment |
| Blue solid | Current production traffic |
| Orange | Alert / special handling |
Deployment vs C4 Deployment Diagram
| Dimension | PlantUML Deployment | C4 Deployment |
|---|---|---|
| Granularity | precise (node + component) | abstract (system/container/component) |
| Standard | UML | C4 model (non-UML) |
| K8s support | native | requires PlantUML C4 lib |
| Readability for complex diagrams | gets messy | C4 is cleaner |
| Best audience | Ops / DevOps | Architects / product |
Architects and PMs → C4 Deployment. Ops and DevOps → PlantUML Deployment (more precise).
Common Errors
| Error | Cause | Fix |
|---|---|---|
| Node not rendering | node spelling error |
Check node "name" as alias syntax |
| Connection lines messy | default auto layout | Add skinparam linetype ortho |
| Component outside node | component not inside node block | Move component declaration inside the node block |
| Dashed becoming solid | --> vs ..> mixed up |
--> is solid, ..> is dashed |
Recap
4 things to remember:
node= physical/container node,component= software component,database= database- Blue-green = two environments + load balancer atomic switch, cheap rollback
- Canary = traffic split (5% → 30% → 100%), safer with observation
- Rolling = same pool, replace one at a time, K8s-native, needs compatibility consideration
Deployment diagram convention: hierarchy cloud → Region → Namespace → Pod; line semantics clear (sync/async/dependency); use color to distinguish old vs new versions.
- Title: PlantUML deployment diagrams: blue-green, canary, and rolling deployments
- Author: puml.online
- Created at : 2026-08-08 10:00:00
- Updated at : 2026-08-14 21:34:29
- Link: https://puml.online/blog/plantuml-deployment-patterns-en/
- License: This work is licensed under CC BY-NC-SA 4.0.