Deployment diagram (PlantUML)

A deployment diagram answers the question a component diagram cannot: where does this actually run, and how do the pieces reach each other?


#What this example shows

  • Nodes containing artefacts, with versions on the artefacts.

  • Protocols and ports on the communication paths.

  • Replication drawn explicitly between data stores.


#A worked example

Open it, edit it, or copy the source below.

Deployment diagram (PlantUML)

The source, which you can paste into a new diagram and edit:

@startuml
node "Edge" {
  [CDN] as CDN
  [Load balancer] as LB
}

node "App cluster (eu-west-1)" {
  node "app-node-1" {
    artifact "api:2.4.0" as A1
    artifact "worker:2.4.0" as W1
  }
  node "app-node-2" {
    artifact "api:2.4.0" as A2
  }
}

database "Postgres primary" as PG
database "Postgres replica" as PGR
node "Redis" as R

CDN --> LB : HTTPS 443
LB --> A1 : HTTP 8080
LB --> A2 : HTTP 8080
A1 --> PG : TCP 5432
A2 --> PG : TCP 5432
A1 --> R : TCP 6379
W1 --> PG : TCP 5432
PG --> PGR : streaming replication
@enduml

#Making it your own

  • Put versions on artefacts, or the diagram describes an aspiration.

  • Label ports as well as protocols; firewall reviews need both.

  • One diagram per environment, or annotate the differences explicitly.



Verbose, stable, and it draws almost everything.