Skip to content
Graphviz (DOT) templates

Network Topology

Cluster-based network diagram with subnets and routers.

Template previewGraphviz (DOT)
Rendering…

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;
}