nordisk/gunnar
assets/gunnar-twin.svg
<svg xmlns="http://www.w3.org/2000/svg" width="735" height="578" viewBox="0 0 735 578" font-family="monospace" font-size="13">
<!-- GENERATED by `cargo xtask svg` from xtask/src/setup_svg.rs. Do not hand-edit:
every arrow starts on the box the verb is typed against, and moving a line
instead of the model is how a diagram starts telling an operator to run
`promote` on the wrong machine. -->
<style>
.box{rx:6;ry:6;stroke-width:1.5}
.dim{fill:#9a948a}
.hdr{fill:#e8e4da;font-size:15px;font-weight:bold}
.kick{fill:#9a948a;font-size:11px}
.name{fill:#e8e4da;font-size:14px;font-weight:bold}
.verb{font-size:12px;font-weight:bold}
.note{fill:#9a948a;font-size:11px}
.flow{stroke:#6fd3f5;stroke-width:1.6;fill:none;marker-end:url(#flow)}
.flip{stroke:#4fae76;stroke-width:1.6;fill:none;marker-end:url(#flip);stroke-dasharray:4 3}
</style>
<defs>
<marker id="flow" markerWidth="9" markerHeight="9" refX="7" refY="3" orient="auto"><path d="M0,0 L7,3 L0,6 Z" fill="#6fd3f5"/></marker>
<marker id="flip" markerWidth="9" markerHeight="9" refX="7" refY="3" orient="auto"><path d="M0,0 L7,3 L0,6 Z" fill="#4fae76"/></marker>
</defs>
<rect width="735" height="578" fill="#14110d"/>
<text x="16" y="28" class="hdr">gunnar-twin · main + twin, paired by the door</text>
<text x="16" y="50" class="dim">both boxes boot the same medium and join the front's door; the door elects the twin</text>
<g transform="translate(-304 -6)">
<text x="320" y="82" class="kick">vm1</text>
<rect class="box" x="320" y="90" width="680" height="90" fill="#2a2438" stroke="#9a7fc0"/>
<text x="332" y="114" class="name">front</text>
<text x="332" y="134" class="dim">door :8474 · mutual TLS · elects the twin</text>
<text x="332" y="151" class="dim">relay :51820 · clock :50123 · gunnar-ui</text>
<text x="320" y="282" class="kick">vm2</text>
<rect class="box" x="320" y="290" width="280" height="108" fill="#123448" stroke="#4f9ec0"/>
<text x="332" y="314" class="name">main</text>
<text x="332" y="334" class="dim">writable — clients push here</text>
<text x="332" y="351" class="dim">git-ssh :2222 · control :50051</text>
<text x="332" y="368" class="dim">primary, by the door's vote</text>
<text x="720" y="282" class="kick">vm3</text>
<rect class="box" x="720" y="290" width="280" height="108" fill="#233a2b" stroke="#4fae76"/>
<text x="732" y="314" class="name">twin</text>
<text x="732" y="334" class="dim">the SAME medium as main</text>
<text x="732" y="351" class="dim">follows the primary's log</text>
<text x="732" y="368" class="dim">the weaker box, by the door</text>
<text x="320" y="444" class="kick">the installer</text>
<rect class="box" x="320" y="452" width="680" height="78" fill="#22201c" stroke="#9a948a"/>
<text x="332" y="476" class="name">one medium</text>
<text x="332" y="496" class="dim">the door's address + the installer CA</text>
<text x="332" y="513" class="dim">the SAME bytes on every box</text>
<path class="flow" d="M520,446 L520,404"/>
<text x="530" y="421" text-anchor="start" class="verb" fill="#6fd3f5">boots</text>
<path class="flow" d="M920,446 L920,404"/>
<text x="930" y="421" text-anchor="start" class="verb" fill="#6fd3f5">boots</text>
<text x="930" y="436" text-anchor="start" class="note">the same bytes</text>
<path class="flow" d="M380,284 L380,186"/>
<text x="390" y="231" text-anchor="start" class="verb" fill="#6fd3f5">join :8474</text>
<text x="390" y="246" text-anchor="start" class="note">mTLS</text>
<path class="flow" d="M780,284 L780,186"/>
<text x="790" y="231" text-anchor="start" class="verb" fill="#6fd3f5">join :8474</text>
<text x="790" y="246" text-anchor="start" class="note">mTLS</text>
<path class="flow" d="M606,320 L714,320"/>
<text x="660" y="313" text-anchor="middle" class="verb" fill="#6fd3f5">follows</text>
<text x="660" y="335" text-anchor="middle" class="note">in the tunnel</text>
</g>
<text x="16" y="548" class="dim">open: does gunnar-twin keep vm1 for the door, or does the door move onto a box?</text>
<text x="16" y="564" class="dim">where = kvm | upcloud — the same install, so the same picture</text>
</svg>