Skip to content

Instantly share code, notes, and snippets.

@XavM
Created July 27, 2025 06:48
Show Gist options
  • Select an option

  • Save XavM/f6fde4acb6ec1499efee4fab195772f2 to your computer and use it in GitHub Desktop.

Select an option

Save XavM/f6fde4acb6ec1499efee4fab195772f2 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="app.diagrams.net" modified="2025-01-27T00:00:00.000Z" agent="5.0" etag="xxx" version="22.1.16" type="device">
<diagram name="Architecture N-tiers" id="architecture">
<mxGraphModel dx="1422" dy="794" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
```
<!-- Internet -->
<mxCell id="internet" value="Internet / Clients" style="ellipse;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="500" y="40" width="120" height="60" as="geometry" />
</mxCell>
<!-- Subnet Load Balancer -->
<mxCell id="lb_subnet" value="Subnet Load Balancer&#xa;192.168.10.0/24" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;verticalAlign=top;" vertex="1" parent="1">
<mxGeometry x="350" y="140" width="420" height="120" as="geometry" />
</mxCell>
<!-- VIP -->
<mxCell id="vip" value="VIP keepalived&#xa;192.168.10.100" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="520" y="170" width="80" height="60" as="geometry" />
</mxCell>
<!-- HAProxy Nodes -->
<mxCell id="haproxy1" value="HAProxy Master&#xa;Linux + HAProxy&#xa;192.168.10.101" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="380" y="180" width="100" height="60" as="geometry" />
</mxCell>
<mxCell id="haproxy2" value="HAProxy Backup&#xa;Linux + HAProxy&#xa;192.168.10.102" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="640" y="180" width="100" height="60" as="geometry" />
</mxCell>
<!-- Firewall Cluster -->
<mxCell id="fw_cluster" value="Cluster Firewall" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;verticalAlign=top;" vertex="1" parent="1">
<mxGeometry x="470" y="300" width="180" height="80" as="geometry" />
</mxCell>
<mxCell id="fw1" value="Firewall 1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" vertex="1" parent="1">
<mxGeometry x="490" y="330" width="60" height="40" as="geometry" />
</mxCell>
<mxCell id="fw2" value="Firewall 2" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" vertex="1" parent="1">
<mxGeometry x="570" y="330" width="60" height="40" as="geometry" />
</mxCell>
<!-- Subnet Application -->
<mxCell id="app_subnet" value="Subnet Application&#xa;192.168.20.0/24" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;verticalAlign=top;" vertex="1" parent="1">
<mxGeometry x="300" y="420" width="520" height="100" as="geometry" />
</mxCell>
<!-- Tomcat Nodes -->
<mxCell id="tomcat1" value="Tomcat Node 1&#xa;Linux + Tomcat&#xa;192.168.20.101" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="320" y="450" width="100" height="60" as="geometry" />
</mxCell>
<mxCell id="tomcat2" value="Tomcat Node 2&#xa;Linux + Tomcat&#xa;192.168.20.102" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="460" y="450" width="100" height="60" as="geometry" />
</mxCell>
<mxCell id="tomcat3" value="Tomcat Node N&#xa;Linux + Tomcat&#xa;192.168.20.10N" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="680" y="450" width="100" height="60" as="geometry" />
</mxCell>
<!-- Subnet Database -->
<mxCell id="db_subnet" value="Subnet Base de données&#xa;192.168.30.0/24" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;verticalAlign=top;" vertex="1" parent="1">
<mxGeometry x="80" y="560" width="1000" height="200" as="geometry" />
</mxCell>
<!-- PostgreSQL Cluster -->
<mxCell id="pg_cluster" value="PostgreSQL HA" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;verticalAlign=top;" vertex="1" parent="1">
<mxGeometry x="100" y="590" width="200" height="150" as="geometry" />
</mxCell>
<mxCell id="pg1" value="PG Master&#xa;192.168.30.101" style="cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="1">
<mxGeometry x="110" y="620" width="60" height="80" as="geometry" />
</mxCell>
<mxCell id="pg2" value="PG Slave 1&#xa;192.168.30.102" style="cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="1">
<mxGeometry x="180" y="620" width="60" height="80" as="geometry" />
</mxCell>
<mxCell id="pg3" value="PG Slave 2&#xa;192.168.30.103" style="cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="1">
<mxGeometry x="110" y="710" width="60" height="20" as="geometry" />
</mxCell>
<!-- MongoDB Cluster 1 -->
<mxCell id="mongo1_cluster" value="MongoDB Cluster 1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;verticalAlign=top;" vertex="1" parent="1">
<mxGeometry x="340" y="590" width="200" height="150" as="geometry" />
</mxCell>
<mxCell id="m1_1" value="Mongo Primary&#xa;192.168.30.111" style="cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="350" y="620" width="60" height="80" as="geometry" />
</mxCell>
<mxCell id="m1_2" value="Mongo Sec&#xa;192.168.30.112" style="cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="420" y="620" width="60" height="80" as="geometry" />
</mxCell>
<mxCell id="m1_3" value="Mongo Sec&#xa;192.168.30.113" style="cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="350" y="710" width="60" height="20" as="geometry" />
</mxCell>
<!-- MongoDB Cluster 2 -->
<mxCell id="mongo2_cluster" value="MongoDB Cluster 2" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;verticalAlign=top;" vertex="1" parent="1">
<mxGeometry x="580" y="590" width="200" height="150" as="geometry" />
</mxCell>
<mxCell id="m2_1" value="Mongo Primary&#xa;192.168.30.121" style="cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="590" y="620" width="60" height="80" as="geometry" />
</mxCell>
<mxCell id="m2_2" value="Mongo Sec&#xa;192.168.30.122" style="cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="660" y="620" width="60" height="80" as="geometry" />
</mxCell>
<mxCell id="m2_3" value="Mongo Sec&#xa;192.168.30.123" style="cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="590" y="710" width="60" height="20" as="geometry" />
</mxCell>
<!-- NFS Cluster -->
<mxCell id="nfs_cluster" value="NFS Cluster VM" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;verticalAlign=top;" vertex="1" parent="1">
<mxGeometry x="820" y="590" width="200" height="150" as="geometry" />
</mxCell>
<mxCell id="nfs1" value="NFS Node 1&#xa;192.168.30.131" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="830" y="620" width="60" height="80" as="geometry" />
</mxCell>
<mxCell id="nfs2" value="NFS Node 2&#xa;192.168.30.132" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="900" y="620" width="60" height="80" as="geometry" />
</mxCell>
<!-- Connections -->
<mxCell id="conn1" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1" source="internet" target="vip">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="560" y="200" as="sourcePoint" />
<mxPoint x="610" y="150" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="conn2" value="" style="endArrow=none;html=1;rounded=0;dashed=1;" edge="1" parent="1" source="vip" target="haproxy1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="520" y="200" as="sourcePoint" />
<mxPoint x="480" y="200" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="conn3" value="" style="endArrow=none;html=1;rounded=0;dashed=1;" edge="1" parent="1" source="vip" target="haproxy2">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="600" y="200" as="sourcePoint" />
<mxPoint x="640" y="200" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="conn4" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1" source="haproxy1" target="fw1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="430" y="240" as="sourcePoint" />
<mxPoint x="520" y="330" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="conn5" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1" source="haproxy2" target="fw2">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="690" y="240" as="sourcePoint" />
<mxPoint x="600" y="330" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="conn6" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1" source="fw1" target="tomcat1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="520" y="370" as="sourcePoint" />
<mxPoint x="370" y="450" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="conn7" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1" source="fw1" target="tomcat2">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="520" y="370" as="sourcePoint" />
<mxPoint x="510" y="450" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="conn8" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1" source="fw2" target="tomcat3">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="600" y="370" as="sourcePoint" />
<mxPoint x="730" y="450" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="conn9" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1" source="tomcat2" target="pg1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="510" y="510" as="sourcePoint" />
<mxPoint x="140" y="620" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="conn10" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1" source="tomcat2" target="m1_1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="510" y="510" as="sourcePoint" />
<mxPoint x="380" y="620" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="conn11" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1" source="tomcat2" target="m2_1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="510" y="510" as="sourcePoint" />
<mxPoint x="620" y="620" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="conn12" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1" source="tomcat2" target="nfs1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="510" y="510" as="sourcePoint" />
<mxPoint x="860" y="620" as="targetPoint" />
</mxGeometry>
</mxCell>
<!-- Replication arrows -->
<mxCell id="repl1" value="" style="endArrow=classic;html=1;rounded=0;dashed=1;strokeColor=#666666;" edge="1" parent="1" source="pg1" target="pg2">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="170" y="660" as="sourcePoint" />
<mxPoint x="180" y="660" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="repl2" value="" style="endArrow=classic;html=1;rounded=0;dashed=1;strokeColor=#666666;" edge="1" parent="1" source="m1_1" target="m1_2">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="410" y="660" as="sourcePoint" />
<mxPoint x="420" y="660" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="repl3" value="" style="endArrow=classic;html=1;rounded=0;dashed=1;strokeColor=#666666;" edge="1" parent="1" source="m2_1" target="m2_2">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="650" y="660" as="sourcePoint" />
<mxPoint x="660" y="660" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="repl4" value="" style="endArrow=classic;html=1;rounded=0;dashed=1;strokeColor=#666666;" edge="1" parent="1" source="nfs1" target="nfs2">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="890" y="660" as="sourcePoint" />
<mxPoint x="900" y="660" as="targetPoint" />
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
```
</diagram>
</mxfile>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment