Skip to content
Graphviz (DOT) templates

Network Topology

Cluster-based network diagram with subnets and routers.

Template previewGraphviz (DOT)
Network cluster_public Public Subnet cluster_app App Subnet cluster_data Data Subnet LB Load Balancer App1 App #1 LB->App1 App2 App #2 LB->App2 App3 App #3 LB->App3 Bastion Bastion Bastion->App1 Bastion->App2 PG Primary DB App1->PG App2->PG App3->PG RR Read Replica PG->RR repl Internet Internet Internet->LB

What this template contains

Graph
Directed
Edges
10
Source
26 lines

Make it your own.

digraph Network {
  rankdir=LR;
  compound=true;
  node [shape=box, style="rounded,filled", fontname="Inter"];

  subgraph cluster_public {
    label="Public Subnet"; color="#1f47f5"; style="rounded"; bgcolor="#eef4ff";
    LB [label="Load Balancer", fillcolor="#bfdbfe"];
    Bastion [label="Bastion", fillcolor="#fde68a"];
  }
  subgraph cluster_app {
    label="App Subnet"; color="#16a34a"; style="rounded"; bgcolor="#ecfdf5";
    App1 [label="App #1", fillcolor="#bbf7d0"];
    App2 [label="App #2", fillcolor="#bbf7d0"];
    App3 [label="App #3", fillcolor="#bbf7d0"];
  }
  subgraph cluster_data {
    label="Data Subnet"; color="#7c3aed"; style="rounded"; bgcolor="#f5f3ff";
    PG  [label="Primary DB", fillcolor="#ddd6fe"];
    RR  [label="Read Replica", fillcolor="#ddd6fe"];
  }
  Internet -> LB;
  LB -> App1; LB -> App2; LB -> App3;
  App1 -> PG; App2 -> PG; App3 -> PG;
  PG -> RR [label="repl"];
  Bastion -> App1; Bastion -> App2;
}