@startuml
skinparam shadowing false
title Vertical, horizontal, and combined scaling controller

start
:Collect rolling p99 metrics;
if (RoCE p99 or utilization breach?) then (yes)
  if (scale mode) then (horizontal)
    :add RDMA rail / endpoint;
  elseif (vertical)
    :increase Gbps per rail / MTU profile;
  else (both)
    :add rail and increase per-rail capacity;
  endif
endif
if (GPU kernel p99 or utilization breach?) then (yes)
  :scale GPU nodes horizontally\nor GPU/node + TFLOP profile vertically;
endif
if (OpenZFS TXG lag breach?) then (yes)
  :add storage nodes horizontally\nor increase write Gbps + sync threads vertically;
endif
if (USM metadata p99 or queue age breach?) then (yes)
  :add metadata domains/API/orchestrators\nand/or increase shards/workers;
endif
:Emit scaling_decisions.csv and SST ScaleApply event;
stop
@enduml
