<?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="1800" pageHeight="1200" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>
        <mxCell id="title" value="Gateway / Runtime 多副本部署图" 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="1700" height="42" as="geometry"/></mxCell>
        <mxCell id="clients" value="浏览器 / IM 平台 / 业务系统 / 定时触发" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e8f1fb;strokeColor=#3b82a0;fontColor=#263238;fontSize=13;fontStyle=1;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="1"><mxGeometry x="520" y="120" width="760" height="70" as="geometry"/></mxCell>
        <mxCell id="ingress" value="Ingress / Load Balancer&#xa;X-Route-Chat-Id 稳定路由" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#fff0df;strokeColor=#c96f2d;fontColor=#263238;fontSize=13;fontStyle=1;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="1"><mxGeometry x="520" y="240" width="760" height="80" as="geometry"/></mxCell>
        <mxCell id="gateway-cluster" value="Gateway Pods" style="swimlane;startSize=36;html=1;container=1;collapsible=0;pointerEvents=0;fillColor=#fff0df;swimlaneFillColor=#ffffff;strokeColor=#c96f2d;fontColor=#263238;fontSize=15;fontStyle=1;dashed=0;strokeWidth=1.5;rounded=0;shadow=0" vertex="1" parent="1"><mxGeometry x="70" y="400" width="700" height="360" as="geometry"/></mxCell>
        <mxCell id="gateway-a" value="Gateway A&#xa;IM · OpenAPI · Scheduler" 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="gateway-cluster"><mxGeometry x="45" y="70" width="270" height="90" as="geometry"/></mxCell>
        <mxCell id="gateway-b" value="Gateway B&#xa;IM lease / leader" 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="gateway-cluster"><mxGeometry x="385" y="70" width="270" height="90" as="geometry"/></mxCell>
        <mxCell id="runtimeclient" value="RuntimeClient&#xa;内部 HTTP dispatch" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#fff6d9;strokeColor=#c28b20;fontColor=#263238;fontSize=13;fontStyle=1;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="gateway-cluster"><mxGeometry x="45" y="210" width="270" height="70" as="geometry"/></mxCell>
        <mxCell id="callback" value="Runtime event callback&#xa;Replica monitor / Recovery" 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="gateway-cluster"><mxGeometry x="385" y="260" width="270" height="70" as="geometry"/></mxCell>
        <mxCell id="runtime-cluster" value="Runtime Pods" 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="1030" y="400" width="700" height="360" as="geometry"/></mxCell>
        <mxCell id="runtime-a" value="Runtime A&#xa;Web / SSE · Agent · Session" 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-cluster"><mxGeometry x="45" y="70" width="270" height="90" as="geometry"/></mxCell>
        <mxCell id="runtime-b" value="Runtime B&#xa;Web / SSE · Agent · Session" 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-cluster"><mxGeometry x="385" y="70" width="270" height="90" as="geometry"/></mxCell>
        <mxCell id="dispatchapi" value="Internal dispatch / recover API" 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-cluster"><mxGeometry x="45" y="210" width="270" height="70" as="geometry"/></mxCell>
        <mxCell id="runtimeevents" value="Runtime event callback sender" 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-cluster"><mxGeometry x="385" y="260" width="270" height="70" as="geometry"/></mxCell>
        <mxCell id="infra" value="共享基础设施" style="swimlane;startSize=36;html=1;container=1;collapsible=0;pointerEvents=0;fillColor=#e5f5f3;swimlaneFillColor=#ffffff;strokeColor=#3c8d87;fontColor=#263238;fontSize=15;fontStyle=1;dashed=0;strokeWidth=1.5;rounded=0;shadow=0" vertex="1" parent="1"><mxGeometry x="240" y="850" width="1320" height="140" as="geometry"/></mxCell>
        <mxCell id="mysql" value="MySQL&#xa;Chat · Task · Config · Ownership · Replica" style="shape=cylinder3;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="infra"><mxGeometry x="50" y="50" width="360" height="72" as="geometry"/></mxCell>
        <mxCell id="redis" value="Redis&#xa;Cache · Broadcast · Lease" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#fff6d9;strokeColor=#c28b20;fontColor=#263238;fontSize=12;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="infra"><mxGeometry x="480" y="50" width="300" height="72" as="geometry"/></mxCell>
        <mxCell id="object" value="对象存储&#xa;附件 · 会话归档 · 生成文件" style="shape=cylinder3;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e5f5f3;strokeColor=#3c8d87;fontColor=#263238;fontSize=12;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="infra"><mxGeometry x="850" y="50" width="360" height="72" as="geometry"/></mxCell>
        <mxCell id="allrole" value="组合部署：单进程承载 Gateway + Runtime" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#f3f5f7;strokeColor=#68737d;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="640" y="1120" width="520" height="48" as="geometry"/></mxCell>
        <mxCell id="k8s" value="规划：K8s manifests · 故障演练 · 跨副本实时事件" 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="1260" y="1120" width="470" height="48" as="geometry"/></mxCell>
        <mxCell id="clients-ingress" 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="clients" target="ingress"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="ingress-gateway" value="IM / OpenAPI / Schedule" 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="ingress" target="gateway-cluster"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="ingress-runtime" value="Web / SSE" 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.8;exitY=1;entryX=0.5;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="ingress" target="runtime-cluster"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="dispatch" value="内部 HTTP + token" 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.4;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="runtimeclient" target="dispatchapi"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="events" 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;exitY=0.7;entryX=1;entryY=0.7;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="runtimeevents" target="callback"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="gateway-mysql" 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.2;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="gateway-cluster" target="mysql"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="runtime-mysql" value="业务状态 / owner" 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.8;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="runtime-cluster" target="mysql"><mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="1240" y="820"/><mxPoint x="550" y="820"/></Array></mxGeometry></mxCell>
        <mxCell id="gateway-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=0.8;exitY=1;entryX=0.2;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="gateway-cluster" target="redis"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="runtime-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=0.2;exitY=1;entryX=0.8;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="runtime-cluster" target="redis"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="runtime-object" 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.7;exitY=1;entryX=0.5;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="runtime-cluster" target="object"><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="1010" 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="1010" width="160" height="36" as="geometry"/></mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
