<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 675" preserveAspectRatio="xMidYMid meet" data-image-type="relationship_boundary">
<title>KEDA 与 HPA 职责边界关系图</title>
<desc>image_type=relationship_boundary; target_section=KEDA 和 HPA 区别; purpose=说明 KEDA、ScaledObject、Trigger、Event Source、Metrics Adapter、HPA 与 Deployment 的职责边界; key_terms=KEDA, ScaledObject, Trigger, Metrics Adapter, HPA, Deployment; reader_task=判断 KEDA 与 HPA 分别负责什么。</desc>
<style>text{font-family:system-ui,Arial,Helvetica,"Microsoft YaHei","PingFang SC",sans-serif;fill:#172033}.h{font-size:28px;font-weight:700}.t{font-size:21px;font-weight:700}.s{font-size:16px}.xs{font-size:15px}.panel{rx:24;fill:#fff;stroke:#cbd5e1;stroke-width:2}.left{fill:#eef7ff;stroke:#5aa4d8}.mid{fill:#f3fbf2;stroke:#6dbb75}.right{fill:#f7f2ff;stroke:#9b7ad8}.tag{rx:18;fill:#eaf0f8;stroke:#a8b6c8}.num{fill:#345a7e}</style>
<rect width="1200" height="675" fill="#f6f8fb"/>
<text x="600" y="72" text-anchor="middle" class="h">事件信号由 KEDA 接入，副本调节由 HPA 执行</text>
<rect x="132" y="120" width="221" height="50" class="tag"/>
<text x="242" y="153" text-anchor="middle" class="h">KEDA</text>
<rect x="132" y="195" width="221" height="72" rx="18" fill="#fff" stroke="#8cc6ee" stroke-width="2"/>
<text x="242" y="224" text-anchor="middle" class="t">Event Source</text><text x="242" y="250" text-anchor="middle" class="s">队列 / 事件 / 外部指标</text>
<rect x="132" y="294" width="221" height="72" rx="18" fill="#fff" stroke="#8cc6ee" stroke-width="2"/>
<text x="242" y="323" text-anchor="middle" class="t">Trigger</text><text x="242" y="349" text-anchor="middle" class="s">读取触发信号</text>
<rect x="132" y="393" width="221" height="78" rx="18" fill="#fff" stroke="#8cc6ee" stroke-width="2"/>
<text x="242" y="423" text-anchor="middle" class="t">ScaledObject</text><text x="242" y="450" text-anchor="middle" class="s">目标与伸缩参数</text>
<rect x="458" y="220" width="284" height="180" class="panel mid"/>
<text x="600" y="267" text-anchor="middle" class="t">Metrics Adapter</text>
<text x="600" y="302" text-anchor="middle" class="s">把事件信号转换为</text>
<text x="600" y="328" text-anchor="middle" class="s">HPA 可消费指标</text>
<rect x="488" y="432" width="224" height="50" class="tag"/>
<text x="600" y="464" text-anchor="middle" class="s">边界：信号接入 / 副本控制</text>
<text x="958" y="164" text-anchor="middle" class="h">HPA</text>
<rect x="847" y="215" width="221" height="82" rx="18" fill="#fff" stroke="#bda5ef" stroke-width="2"/>
<text x="958" y="247" text-anchor="middle" class="t">Replica Decision</text><text x="958" y="274" text-anchor="middle" class="s">计算期望副本数</text>
<rect x="847" y="350" width="221" height="82" rx="18" fill="#fff" stroke="#bda5ef" stroke-width="2"/>
<text x="958" y="382" text-anchor="middle" class="t">Deployment</text><text x="958" y="409" text-anchor="middle" class="s">执行副本调节</text>
<rect x="220" y="555" width="760" height="54" class="tag"/>
<text x="600" y="589" text-anchor="middle" class="s">判断边界时先看：谁接收事件、谁提供指标、谁最终改变副本数</text>
</svg>
