<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="drawio" version="26.0.0">
  <diagram name="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="1750" pageHeight="1050" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>
        <mxCell id="title" value="多租户配置与跨副本广播图" style="text;html=1;strokeColor=none;fillColor=none;fontSize=26;fontColor=#263238;fontStyle=1;align=left;verticalAlign=middle;whiteSpace=wrap" vertex="1" parent="1"><mxGeometry x="50" y="25" width="1650" height="42" as="geometry"/></mxCell>
        <mxCell id="sources" value="配置事实源" style="swimlane;startSize=36;html=1;container=1;collapsible=0;pointerEvents=0;fillColor=#f3f5f7;swimlaneFillColor=#ffffff;strokeColor=#68737d;fontColor=#263238;fontSize=15;fontStyle=1;dashed=0;strokeWidth=1.5;rounded=0;shadow=0" vertex="1" parent="1"><mxGeometry x="50" y="150" width="350" height="650" as="geometry"/></mxCell>
        <mxCell id="file" value="文件模式&#xa;config.json" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#f3f5f7;strokeColor=#68737d;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="sources"><mxGeometry x="55" y="85" width="240" height="80" as="geometry"/></mxCell>
        <mxCell id="publicdb" value="数据库模式&#xa;公共配置库" style="shape=cylinder3;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e9f5ec;strokeColor=#4f8a5b;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="sources"><mxGeometry x="55" y="240" width="240" height="80" as="geometry"/></mxCell>
        <mxCell id="env" value="环境变量引用&#xa;${VAR}" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#f1eafa;strokeColor=#8064a2;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="sources"><mxGeometry x="55" y="395" width="240" height="80" as="geometry"/></mxCell>
        <mxCell id="tenantlayout" value="租户布局 / 覆盖" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#fff0df;strokeColor=#c96f2d;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="sources"><mxGeometry x="55" y="535" width="240" height="70" as="geometry"/></mxCell>
        <mxCell id="runtime-a" value="副本 A · Tenant Runtime" style="swimlane;startSize=36;html=1;container=1;collapsible=0;pointerEvents=0;fillColor=#e9f5ec;swimlaneFillColor=#ffffff;strokeColor=#4f8a5b;fontColor=#263238;fontSize=15;fontStyle=1;dashed=0;strokeWidth=1.5;rounded=0;shadow=0" vertex="1" parent="1"><mxGeometry x="480" y="120" width="540" height="730" as="geometry"/></mxCell>
        <mxCell id="load" value="loadTenantConfig&#xa;解析 + 校验 + merge" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#fff0df;strokeColor=#c96f2d;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="runtime-a"><mxGeometry x="85" y="65" width="370" height="75" as="geometry"/></mxCell>
        <mxCell id="bootcfg" value="bootCfg&#xa;冷配置冻结快照" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#f1eafa;strokeColor=#8064a2;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="runtime-a"><mxGeometry x="55" y="190" width="190" height="80" as="geometry"/></mxCell>
        <mxCell id="store" value="ConfigStore&#xa;resolved + version" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e9f5ec;strokeColor=#4f8a5b;fontColor=#263238;fontSize=13;fontStyle=1;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="runtime-a"><mxGeometry x="295" y="190" width="190" height="80" as="geometry"/></mxCell>
        <mxCell id="api" value="Console / API&#xa;ConfigStore.transact()" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e8f1fb;strokeColor=#3b82a0;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="runtime-a"><mxGeometry x="55" y="330" width="190" height="80" as="geometry"/></mxCell>
        <mxCell id="reconcile" value="Reconciler&#xa;build shadow → swap → cleanup" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#fff6d9;strokeColor=#c28b20;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="runtime-a"><mxGeometry x="295" y="330" width="190" height="80" as="geometry"/></mxCell>
        <mxCell id="hot" value="热域&#xa;Agent · Model · Channel" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e9f5ec;strokeColor=#4f8a5b;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="runtime-a"><mxGeometry x="55" y="485" width="190" height="80" as="geometry"/></mxCell>
        <mxCell id="cold" value="冷域&#xa;Auth · DB · Tenant · Role" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#f1eafa;strokeColor=#8064a2;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="runtime-a"><mxGeometry x="295" y="485" width="190" height="80" as="geometry"/></mxCell>
        <mxCell id="broadcast" value="Publish&#xa;config.changed {tenant, version}" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#fff6d9;strokeColor=#c28b20;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="runtime-a"><mxGeometry x="115" y="615" width="310" height="65" as="geometry"/></mxCell>
        <mxCell id="bus" value="跨副本通知" style="swimlane;startSize=36;html=1;container=1;collapsible=0;pointerEvents=0;fillColor=#fff6d9;swimlaneFillColor=#ffffff;strokeColor=#c28b20;fontColor=#263238;fontSize=15;fontStyle=1;dashed=0;strokeWidth=1.5;rounded=0;shadow=0" vertex="1" parent="1"><mxGeometry x="1090" y="170" width="270" height="560" as="geometry"/></mxCell>
        <mxCell id="redis" value="Redis pub/sub&#xa;优先" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#fff6d9;strokeColor=#c28b20;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="bus"><mxGeometry x="45" y="90" width="180" height="80" as="geometry"/></mxCell>
        <mxCell id="eventtable" value="公共库事件表&#xa;最终收敛" style="shape=cylinder3;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e9f5ec;strokeColor=#4f8a5b;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="bus"><mxGeometry x="45" y="250" width="180" height="90" as="geometry"/></mxCell>
        <mxCell id="nottruth" value="通知只携带版本；收到后重新读取事实源。Redis 不是配置权威。" style="text;html=1;strokeColor=none;fillColor=none;fontSize=12;fontColor=#52606d;fontStyle=0;align=center;verticalAlign=middle;whiteSpace=wrap" vertex="1" parent="bus"><mxGeometry x="30" y="395" width="210" height="90" as="geometry"/></mxCell>
        <mxCell id="runtime-b" value="副本 B · Tenant Runtime" style="swimlane;startSize=36;html=1;container=1;collapsible=0;pointerEvents=0;fillColor=#e9f5ec;swimlaneFillColor=#ffffff;strokeColor=#4f8a5b;fontColor=#263238;fontSize=15;fontStyle=1;dashed=0;strokeWidth=1.5;rounded=0;shadow=0" vertex="1" parent="1"><mxGeometry x="1430" y="150" width="270" height="650" as="geometry"/></mxCell>
        <mxCell id="subscribe" value="订阅 config.changed" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#fff6d9;strokeColor=#c28b20;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="runtime-b"><mxGeometry x="35" y="80" width="200" height="70" as="geometry"/></mxCell>
        <mxCell id="reload" value="按 tenant + version&#xa;重新读取" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#fff0df;strokeColor=#c96f2d;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="runtime-b"><mxGeometry x="35" y="220" width="200" height="80" as="geometry"/></mxCell>
        <mxCell id="storeb" value="ConfigStore&#xa;reconcile" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e9f5ec;strokeColor=#4f8a5b;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="runtime-b"><mxGeometry x="35" y="370" width="200" height="80" as="geometry"/></mxCell>
        <mxCell id="newtask" value="后续新任务&#xa;使用新快照" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e8f1fb;strokeColor=#3b82a0;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="runtime-b"><mxGeometry x="35" y="520" width="200" height="70" as="geometry"/></mxCell>
        <mxCell id="src-file" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=1;exitY=0.5;entryX=0;entryY=0.2;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="file" target="load"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="src-publicdb" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=1;exitY=0.5;entryX=0;entryY=0.4;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="publicdb" target="load"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="src-env" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=1;exitY=0.5;entryX=0;entryY=0.6000000000000001;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="env" target="load"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="src-tenantlayout" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=1;exitY=0.5;entryX=0;entryY=0.8;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="tenantlayout" target="load"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="load-boot" value="freeze" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=0.3;exitY=1;entryX=0.5;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="load" target="bootcfg"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="load-store" value="resolved" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=0.7;exitY=1;entryX=0.5;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="load" target="store"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="api-store" value="transact" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=1;exitY=0.4;entryX=0;entryY=0.7;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="api" target="store"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="store-reconcile" value="新快照" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="store" target="reconcile"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="reconcile-hot" value="即时应用" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=0.2;exitY=1;entryX=0.5;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="reconcile" target="hot"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="reconcile-cold" value="需滚动重启" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#8064a2;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=1;endArrow=block;endFill=1;exitX=0.8;exitY=1;entryX=0.5;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="reconcile" target="cold"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="store-broadcast" value="commit 后发布" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=1;exitY=0.5;entryX=0.5;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="store" target="broadcast"><mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="1000" y="330"/><mxPoint x="1000" y="700"/><mxPoint x="750" y="700"/></Array></mxGeometry></mxCell>
        <mxCell id="publish-redis" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=1;exitY=0.3;entryX=0;entryY=0.5;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="broadcast" target="redis"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="publish-table" value="无 Redis 时" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=1;exitY=0.7;entryX=0;entryY=0.5;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="broadcast" target="eventtable"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="redis-sub" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=1;exitY=0.5;entryX=0;entryY=0.3;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="redis" target="subscribe"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="table-sub" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=1;exitY=0.5;entryX=0;entryY=0.7;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="eventtable" target="subscribe"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="sub-reload" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="subscribe" target="reload"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="reload-store" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="reload" target="storeb"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="store-task" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="storeb" target="newtask"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="legend-current" value="当前已落地" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e9f5ec;strokeColor=#4f8a5b;fontColor=#263238;fontSize=12;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="1"><mxGeometry x="50" y="930" width="150" height="36" as="geometry"/></mxCell>
        <mxCell id="legend-planned" value="规划 / 待完善" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#f1eafa;strokeColor=#8064a2;fontColor=#263238;fontSize=12;fontStyle=0;dashed=1;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="1"><mxGeometry x="220" y="930" width="160" height="36" as="geometry"/></mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
