C4 Deployment Diagrams: A Practical Guide with C4-PlantUML and Visual Paradigm

Read this post in:

Introduction

A C4 deployment diagram answers a question that the other C4 views leave open: where does the software run? It maps instances of software systems or containers from the static architecture model onto infrastructure within a particular deployment environment—such as production, staging, or development. It is based on UML deployment diagrams, but uses C4’s architectural abstractions and terminology.

A container diagram describes the high-level applications and data stores that make up a software system, along with their responsibilities and connections. It generally does not show environment-specific details such as clustering, load balancers, or failover. A deployment diagram adds that runtime context: it shows which software instances are hosted where, and the important connections between them.

C4 Deployment Diagrams: A Practical Guide with C4-PlantUML and Visual Paradigm

This guide explains when to use a deployment diagram, its key concepts, and how to create examples with PlantUML. It also covers a workflow using Visual Paradigm’s C4 modeling tools and VPasCode’s diagram-as-code and AI features.

When to use a deployment diagram

Create a deployment diagram when readers need to understand how the logical architecture is realized in a particular environment.

It is especially useful when you need to:

  • Show which runtime nodes host which software containers.

  • Explain infrastructure boundaries and important network paths.

  • Communicate production topology to developers, architects, infrastructure teams, or operations and support staff.

  • Compare how a system is deployed in different environments.

  • Discuss deployment-related concerns such as replication, failover, or load balancing.

  • Clarify the runtime dependencies between software and infrastructure services.

A deployment diagram is usually environment-specific. Production may include multiple application instances, a load balancer, and replicated data stores, while a development environment may be a single local machine. The C4 guidance suggests producing one deployment diagram per environment rather than combining several environments into an unreadable view.

You may not need one if the deployment is simple and already clear to your audience. The diagram should earn its place by answering an architectural, operational, or communication question.

Purpose and key concepts

Deployment environment

A deployment environment defines the context for the view: for example, production, staging, development, or a disaster-recovery environment. State it in the title or scope description. Without that context, readers may assume that a diagram shows every environment or the system’s only deployment arrangement.

Deployment node

A deployment node represents somewhere a software system or container instance runs. Nodes can represent physical devices, virtual machines, cloud or platform services, containerized infrastructure, or execution environments such as an application server. Nodes can be nested to show infrastructure hierarchy—for example, a cloud region containing a network and a cluster.

Software system and container instances

The software represented in a deployment diagram should correspond to the static architecture model. A container instance is a deployed instance of a container already defined in that model; it is not a new type of C4 container. The deployment view adds the runtime location and, when relevant, the number of instances.

For example, a container diagram might define an “Orders API” application. A production deployment diagram might show three instances of that API running in a cluster. This connection between views helps readers understand both what the software is and where it runs.

Infrastructure nodes

A deployment view may also include infrastructure that supports the application, such as load balancers, DNS services, firewalls, or other runtime dependencies. Include these when they help explain the deployment; don’t turn the diagram into a full cloud inventory.

Relationships

Relationships show important connections between deployed elements. Label them with useful information, such as the direction of communication, protocol, or network path, when that detail matters. A label such as “HTTPS” is more informative than an unexplained line, but you should include only details that are accurate and relevant.

Scope and audience

A deployment diagram’s scope is one or more software systems within a single deployment environment. Its intended audience can include software architects, developers, infrastructure architects, and operations or support staff.

What a deployment diagram is—and isn’t

A C4 deployment diagram is a view of the runtime deployment of the software architecture. It is not automatically:

  • A complete cloud-provider resource inventory.

  • A network implementation or firewall rule specification.

  • A deployment procedure or build pipeline.

  • A guarantee that the architecture is configured exactly as drawn today.

For low-level operational detail, use the appropriate infrastructure, network, or deployment documentation alongside the C4 view. Keep the C4 diagram at the level needed to explain the architectural placement and important runtime connections.

PlantUML examples

The examples below use PlantUML’s UML-style deployment notation. They illustrate C4 deployment concepts—environment, deployment nodes, deployed software, and relationships—but they are not PlantUML’s dedicated C4 syntax. A box labeled as a container is a visual convention here; keep it consistent with the container diagram and document your legend if there could be confusion.

Example 1: Simple production deployment

This example shows a web application and an API deployed on separate runtime nodes, with an external payment provider.

@startuml
title Online Shop — Production Deployment

node "Customer Device" as device {
  artifact "Browser" as browser
}

node "Cloud Environment" as cloud {
  node "Web Server" as webServer {
    artifact "Web App\n[C4 container instance]" as webApp
  }

  node "Application Server" as appServer {
    artifact "Orders API\n[C4 container instance]" as ordersApi
  }

  database "Orders Database\n[infrastructure node]" as ordersDb
}

cloud "External Payment Provider" as paymentProvider

browser --> webApp : HTTPS
webApp --> ordersApi : HTTPS
ordersApi --> ordersDb : Database connection
ordersApi --> paymentProvider : HTTPS
@enduml

This is a useful starting view for explaining which containers run where and what their main runtime connections are. In a real diagram, replace generic labels with the names of the actual environment and services where that detail is appropriate.

Example 2: Scaled Kubernetes deployment

This example shows nested deployment nodes and multiple instances of the same application container. It is intentionally provider-neutral.

@startuml
title Online Shop — Production Kubernetes Deployment

node "Cloud Region" as region {
  node "Production Network" as network {
    node "Kubernetes Cluster" as cluster {
      node "Ingress Controller" as ingress

      node "Orders API Deployment" as apiDeployment {
        artifact "Orders API Pod 1\n[container instance]" as apiPod1
        artifact "Orders API Pod 2\n[container instance]" as apiPod2
        artifact "Orders API Pod 3\n[container instance]" as apiPod3
      }

      node "Worker Deployment" as workerDeployment {
        artifact "Order Worker Pod 1\n[container instance]" as workerPod1
        artifact "Order Worker Pod 2\n[container instance]" as workerPod2
      }
    }

    database "Managed Orders Database" as db
  }
}

node "Customer Device" as device {
  artifact "Browser" as browser
}

browser --> ingress : HTTPS
ingress --> apiPod1 : Routes requests
ingress --> apiPod2 : Routes requests
ingress --> apiPod3 : Routes requests

apiPod1 --> db : Database connection
apiPod2 --> db : Database connection
apiPod3 --> db : Database connection

apiPod1 --> workerPod1 : Publishes order event
apiPod1 --> workerPod2 : Publishes order event
@enduml

The diagram makes scale visible by showing several instances. Use this level of detail only if instance count and placement matter to the discussion. For a simplified architecture overview, a grouped node labelled “Orders API — 3 instances” may be easier to read.

Example 3: High-availability deployment with a load balancer

This view focuses on a deployment concern—redundant application nodes and a primary/replica database arrangement. Confirm that labels such as “primary,” “replica,” and “failover” match the real design before using them.

@startuml
title Online Shop — Production High Availability

node "Customer Device" as device {
  artifact "Browser" as browser
}

cloud "Cloud Environment" as cloud {
  node "Public Network" as publicNetwork {
    node "Load Balancer" as loadBalancer
  }

  node "Application Zone A" as zoneA {
    artifact "Orders API Instance A" as apiA
  }

  node "Application Zone B" as zoneB {
    artifact "Orders API Instance B" as apiB
  }

  node "Data Tier" as dataTier {
    database "Orders DB — Primary" as primaryDb
    database "Orders DB — Replica" as replicaDb
  }
}

browser --> loadBalancer : HTTPS
loadBalancer --> apiA : Forwards requests
loadBalancer --> apiB : Forwards requests

apiA --> primaryDb : Read/write
apiB --> primaryDb : Read/write
primaryDb --> replicaDb : Replication
@enduml

This example is useful when the audience needs to understand the high-level availability arrangement. It is not, by itself, a failover runbook or a complete description of replication behavior.

Example 4: Separate production and staging views

Keep different environments separate when their infrastructure differs materially. A staging diagram, for example, might show fewer instances and a separate database.

@startuml
title Online Shop — Staging Deployment

node "Staging Environment" as staging {
  node "Application Host" as host {
    artifact "Web App" as web
    artifact "Orders API — 1 instance" as api
  }

  database "Staging Orders Database" as db
}

cloud "Payment Sandbox" as paymentSandbox

web --> api : HTTPS
api --> db : Database connection
api --> paymentSandbox : HTTPS
@enduml

Avoid combining this with the production topology unless the comparison itself is the purpose. Separate views are typically easier to maintain and interpret.

PlantUML authoring tips

  • Use informative titles. Include the system and environment, such as “Online Shop — Production Deployment.”

  • Name the runtime nodes. Use names that communicate whether a box is a region, cluster, host, managed service, or execution environment.

  • Connect back to the container model. Reuse the same container names and identify deployed instances clearly.

  • Label important connections. Include a protocol or connection purpose when it helps the reader.

  • Use nesting to show hierarchy. Nest only to the level necessary to explain the placement.

  • Keep the diagram selective. Omit resources that don’t affect the architectural story.

  • Add a legend when using custom conventions. This is especially important if you use color, icons, or labels to distinguish C4 containers from infrastructure.

  • Validate every technical claim. A rendered diagram can be syntactically valid and still describe an incorrect deployment.

Tooling: Visual Paradigm’s C4 modeling tools and VPasCode

Visual Paradigm offers dedicated C4 modeling support, including deployment diagrams. Its product documentation describes both C4 diagramming and AI-assisted C4 generation; check the current edition and plan requirements for specific features.

VPasCode is a browser-based diagram-as-code workspace that supports PlantUML and provides a code editor with rendered output. Visual Paradigm describes AI features for generating diagram code from prompts and modifying existing diagrams, as well as tools for syntax correction and translation. Some advanced features may depend on a paid add-on or edition.

These tools support related but distinct ways of working:

  • Visual Paradigm’s C4 modeling tools are suited to building a dedicated C4 view with C4-specific symbols and notation.

  • VPasCode is suited to writing and iterating on a text-based diagram definition, such as PlantUML, with a rendered preview.

  • AI-assisted generation can provide a first draft, but it cannot confirm that the deployed architecture, network paths, or redundancy arrangements are correct.

A practical workflow

  1. Start with the container diagram. Identify the application and data-store containers that need to appear in the deployment view.

  2. Choose one environment. Decide whether the diagram represents production, staging, development, or another named environment.

  3. Gather verified deployment facts. Confirm hosting nodes, instance counts, major infrastructure nodes, and important connections with the teams responsible for the system.

  4. Draft the diagram. Use Visual Paradigm’s C4 deployment diagram support for a visual modeling workflow, or use PlantUML in VPasCode for diagram-as-code.

  5. Use AI for scaffolding, not authority. A prompt can request a production view, name the known containers and infrastructure, and explicitly say not to invent services, protocols, or scaling behavior.

  6. Review the rendered result. Check legibility, naming consistency, scope, and whether the relationships mean what their labels say.

  7. Validate with the relevant engineers. Ask application, infrastructure, and operations owners to review the factual deployment details.

  8. Keep it maintainable. Store the editable model or source code with the architecture documentation and identify what changes should trigger a review.

An example prompt for a first draft:

Create a C4 deployment view for the Online Shop production environment. Use only these known elements: Web App, Orders API, Orders Database, Load Balancer, and Payment Provider. Show the Web App and API as containers deployed to the specified runtime nodes. Do not invent instance counts, network zones, failover behavior, or protocols. Mark unknown details for review.

The prompt deliberately limits assumptions. Review every generated element and relationship against the current deployment before treating the diagram as documentation.

Why use diagram-as-code?

A text-based diagram definition can be useful when architecture documentation is maintained alongside software or infrastructure changes.

Potential benefits include:

  • Reviewable changes: edits to a text file can be inspected like other documentation changes.

  • Repeatable rendering: the same source can be rendered again after changes.

  • Easy iteration: changing names or relationships in code can be faster than repositioning many shapes manually.

  • Reuse: common labels or conventions can be copied between related diagrams, with care to keep them synchronized.

  • Tool choice: PlantUML source is a text representation that can be edited in a compatible tool such as VPasCode.

Diagram-as-code is not automatically a single source of truth. It can become stale just like a hand-drawn diagram; it needs ownership, review, and validation.

Why Visual Paradigm’s AI ecosystem may stand out

“Stand out” is best understood as a fit-for-workflow argument, not an objective claim that one vendor is best for every team. Visual Paradigm’s distinguishing proposition is the combination of multiple modeling surfaces: dedicated C4 tools, AI-assisted generation, VPasCode for editable diagram code, and documentation-oriented tools such as OpenDocs. Its product materials describe workflows that move from AI-generated diagrams to code-level refinement and then into documentation.

That combination can be useful when a team wants to:

  • Generate an initial C4 deployment view from a written description.

  • Refine the result in a dedicated C4 modeling environment.

  • Use PlantUML or other supported diagram-as-code formats for fine-grained text editing.

  • Carry diagrams into project documentation instead of treating them only as exported images.

  • Use AI for drafting, revisions, syntax assistance, or translation as part of a broader diagram workflow.

The main benefit is workflow breadth: AI can help get past the blank page, a modeling tool can support structured editing, and diagram-as-code can support text-based iteration. These advantages matter most when a team will use those workflows consistently; a simpler tool may be enough for teams that only need occasional static diagrams.

AI output still needs review. A plausible-looking diagram may contain nonexistent nodes, incorrect placement, or assumed network behavior. Visual Paradigm’s own C4 guidance recommends reviewing and validating AI-generated diagrams for accuracy and completeness.

Conclusion

A C4 deployment diagram connects the architecture described by the static C4 views to the infrastructure of a specific environment. It helps answer practical questions: which software instances run where, what supports them, and how the important runtime connections fit together.

Keep the view scoped to one environment, reuse container names from the architecture model, and include only infrastructure detail that serves the reader’s needs. PlantUML and VPasCode can make the diagram easy to edit as text; Visual Paradigm’s C4 tools can support dedicated C4 modeling; and AI can accelerate drafting. The final responsibility remains with the team: verify the deployment facts, keep the diagram current, and make sure it explains the real system rather than an attractive guess.