Skip to content

Instantly share code, notes, and snippets.

@korczis
Last active August 23, 2016 17:00
Show Gist options
  • Select an option

  • Save korczis/7748458 to your computer and use it in GitHub Desktop.

Select an option

Save korczis/7748458 to your computer and use it in GitHub Desktop.
Architecture in Graphviz
// dot.exe -T svg -o architecture.svg architecture.dot
digraph architecture {
// Render chart with left to right layout
rankdir="LR";
// AMQP communication node
amqp [label="AMQP",shape=box,fillcolor="burlywood",style="filled"];
// Clients
c0 [label="Client",shape=box,fillcolor="burlywood",style="filled"];
c1 [label="Client",shape=box,fillcolor="burlywood",style="filled"];
// Database
db [label="Database",shape=box,fillcolor="burlywood",style="filled"];
// Load balancer
lb [label="Load Balancer",shape=box,fillcolor="burlywood",style="filled"];
// Servers
s0 [label="Server",shape=box,fillcolor="burlywood",style="filled"];
s1 [label="Server",shape=box,fillcolor="burlywood",style="filled"];
// Clients talks to Load Balancer
c0 -> lb [dir=both];
c1 -> lb [dir=both];
// Load Balancer talks to servers
lb -> s0 [dir=both];
lb -> s1 [dir=both];
// Servers are connected to AMQP
s0 -> amqp [dir=both];
s1 -> amqp [dir=both];
// Servers are connected to Database
s0 -> db [dir=both];
s1 -> db [dir=both];
}
@korczis
Copy link
Author

korczis commented Dec 2, 2013

Output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment