Deployment Diagram Example
Section titled “ Deployment Diagram Example”The Deployment diagram shows where the Services run: the servers, cloud services, network zones and environments that host them. Each Service is drawn as a Container Instance inside the infrastructure node it runs on.
This page is example 6 of the six Order-to-Cash C4 examples. See Example C4 Diagrams for an overview of all diagram types and when to use each.
Scope for This Example
Section titled “Scope for This Example”| Example | Diagram type to pick in the import | Architectural Scope | Subject | When it is set | Needed before Promote |
|---|---|---|---|---|---|
| Order-to-Cash — on servers | Deployment | none | — | optional: the wizard's Scope step may name one System; leave it empty for the O2C | ❌ No |
New 7.12 A Deployment has no Architectural Scope or one System, and it can be promoted without one. Click Skip in the wizard's Scope step. Scoped to a System, the Deployment shows in that System's Related view pill; the O2C Deployment has no scope.
When to Use
Section titled “When to Use”- ✅ Documenting production infrastructure for operations and DevOps teams
- ✅ Showing which server each Service runs on before a migration or a server change
- ✅ Security reviews: seeing what runs together on one host
- ⚠️ Does not show what happens inside a Service: that is in L2 and L3
Example: Order-to-Cash — on servers
Section titled “Example: Order-to-Cash — on servers”This example uses the Order-to-Cash (O2C) demo data. The three servers are the ProcessingMachineName values that the O2C demo data script logs from: portal-server-01, erp-server-01 and wms-server-01. Each of the 14 Services of INT1337 - Order-to-Cash is drawn on the server it logs from; ERP-Finance's two Services run on erp-server-01. The sample has no relationships: the Flows between these Services are on the L2 and the Dynamic.
| Preview | Mermaid Code |
|---|---|
|
C4Deployment
title Order-to-Cash — on servers
Deployment_Node(portal_server, "portal-server-01", "Windows Server") {
Container(rcv_order_incoming, "INT1337-RCV-Order-Incoming", "Integration")
Container(snd_order_incoming, "INT1337-SND-Order-Incoming", "Integration")
Container(rcv_confirm_incoming, "INT1337-RCV-Confirm-Incoming", "Integration")
Container(snd_confirm_outgoing, "INT1337-SND-Confirm-Outgoing", "Integration")
}
Deployment_Node(erp_server, "erp-server-01", "Windows Server") {
Container(rcv_order_entry, "INT1337-RCV-Order-Entry", "Integration")
Container(ent_order_entry, "INT1337-ENT-Order-Entry", "Integration")
Container(rcv_planned_incoming, "INT1337-RCV-Planned-Incoming", "Integration")
Container(pln_order_scheduled, "INT1337-PLN-Order-Scheduled", "Integration")
Container(rcv_invoice_incoming, "INT1337-RCV-Invoice-Incoming", "Integration")
Container(inv_order_invoiced, "INT1337-INV-Order-Invoiced", "Integration")
}
Deployment_Node(wms_server, "wms-server-01", "Windows Server") {
Container(rcv_packing_incoming, "INT1337-RCV-Packing-Incoming", "Integration")
Container(pkg_order_packed, "INT1337-PKG-Order-Packed", "Integration")
Container(rcv_delivered_incoming, "INT1337-RCV-Order-Delivered-Incoming", "Integration")
Container(rcv_order_delivered, "INT1337-RCV-Order-Delivered", "Integration")
}
|
|

Animated walkthrough: the markup above imported. The servers stay unbound labels, and each Container Instance is bound to its Service.
What Each Element Binds To
Section titled “What Each Element Binds To”| Markup element | Macro | Stored as | Binds to | Status in Review & Resolve |
|---|---|---|---|---|
| portal-server-01, erp-server-01, wms-server-01 | Deployment_Node |
Deployment Node | Nothing: an unbound label | Unbound |
The 14 INT1337-* Services |
Container |
New 7.12 Container Instance | The Services of the same name | Matched |
After Resolve All, the diagram holds 14 Container Instances bound to the Services and three unbound servers.
Container Instances in Mermaid
Section titled “Container Instances in Mermaid”New 7.12 Mermaid and PlantUML have no Container_Instance macro. A Deployment export writes each Container Instance as a Container inside its Deployment_Node, and the import stores a Container on a Deployment as a Container Instance. Write Deployment samples with Container, as above. The Designer's Toolbox offers Container Instance and Container Instance (External) for a Deployment, and no plain Container.
A Container Instance binds to a Service or a Contract and shows its monitoring state. Deployment nodes and infrastructure nodes are unbound labels: they bind to neither a Domain nor a Service, and a Deployment has no Domain filter chip. Never draw a System as a Container on a Deployment: a Container named after a System imports as an unbound placeholder with the note to draw it as a System shape.
Connectors between two nodes fold into one per node pair, holding one Flow per relation.
Next Steps
Section titled “ Next Steps”- Build the Order-to-Cash C4 set — Put all six examples in one set and generate the rest
- Import Your First C4 Diagram — Create a Diagram Set, import Mermaid markup, and bind nodes to your Repository
- Order-to-Cash C4 Examples
- Creating Your First C4 Diagram — Build a diagram by hand instead
Related Topics
Section titled “ Related Topics”- Example C4 Diagrams — Overview of all diagram types
- L2: Container Diagram Example — The Portal's Services and their Flows
- L3: Component Diagram Example — Inside one Service
- Dynamic Diagram Example — Runtime interaction sequence
- Generate O2C Demo Data Script
- What is C4 Diagrams?