集群令牌环
令牌环网 · 转发编排
{{ stateLabel }}
{{ aliveCount }} 成员
上次同步 {{ lastSyncAgo }}
♔ 本机 leader
本节点加入密钥
{{ ring.nodeKey }}
其他节点通过本节点加入集群时需提供此密钥
环节点○
{{ ring.nodes.length }}
活跃 {{ aliveCount }} · 离线 {{ ring.nodes.length - aliveCount }}
活跃转发→
{{ ring.topology.length }}
待办命令⚙︎
{{ ring.pending.length }}
本节点为初始 leader,已就绪;可直接创建,或输入对端地址加入既有集群
本节点已脱离集群,可创建新集群或加入既有集群
退出后本节点仅保留 localOnly 转发;可重新创建/加入
○环拓扑
{{ shortId(n.id) }}
本机
LEADER
离线
负载 {{ Math.round(n.load.memPct + n.load.netPct) }}
{{ n.addr }}
→
环节点为空(已脱离)
⚙︎令牌命令(待执行)
{{ t.id }}
{{ taskCmdLabel(t) }}
→
移除节点 {{ shortId(t.removeNode) }}
{{ t.local.name }}
→
{{ t.remote.name }}
:{{ t.link?.remotePort }}
⚖负载均衡
{{ bal.dryRun ? '观察模式(不释放)' : '已启用(会释放)' }}
规则:本机转发 {{ bal.selfForwards }} 条
> 平摊份额 {{ bal.share }}
且至少 {{ 2 }} 条时,本机自行释放一条
集群共 {{ bal.totalForwards }} 条 / {{ bal.aliveNodes }} 台存活
两次释放间隔 ≥ {{ Math.round(bal.cooldownSec / 60) }} 分钟
设 W4F_BALANCE_MODE=on 才会真正释放
每个节点各自判断自己的转发,超了就自己撤销一条并丢回环上,
由环节点按「最闲者优先」重新认领。没有中心调度。
{{ shortId(n.id) }}
本机
LEADER
离线
超出份额
转发 {{ n.forwards }}
内存 {{ n.memPct.toFixed(1) }}%
网络 {{ n.netPct.toFixed(1) }}%
份额 {{ bal.share }}
暂无节点负载数据
释放进行中
本机已释放 {{ bal.releasing.local }}:{{ bal.releasing.remotePort }},
等待环把它认领到别的节点
将释放
本机将撤销 {{ bal.wouldRelease.local }}:{{ bal.wouldRelease.remotePort }}
并丢回环上,由最闲节点接管
冷却中
本机超出份额,但距上次释放不足
{{ Math.round(bal.cooldownSec / 60) }} 分钟
(已过 {{ cooldownAgo }})
暂不释放
本机超出份额,原因:{{ blockedLabel }}
单节点
本机未加入集群,无需均衡
已均衡
本机持有 {{ bal.selfForwards }} 条,未超平摊份额 {{ bal.share }},无需释放
→活跃转发拓扑
{{ t.taskId }}
{{ t.local.name }}
→
{{ t.remote.name }}
:{{ t.link?.remotePort }}
owner: {{ shortId(t.ownerId) }}
{{ t.active ? '运行中' : '已停' }}
暂无活跃转发(画布编辑后将经令牌分发)
≣集群日志
{{ ring.log.length }} 条
JSON(完整结构)
文本(可读 TSV)
CSV(审计用,Excel 可开)
JSON(完整结构)
CSV(审计用,逐行展开)
#{{ e.seq }}
{{ formatTs(e.at) }}
{{ shortId(e.node) }}
{{ kindLabel(e.kind) }}
{{ detailOf(e) }}
日志为空
集群未启动(无环节点)
填入对端节点可被本机路由到达的真实 IP:port(或域名:port),本节点将向对端请求加入并采纳其环状态,令牌到达即并入环。需提供对端节点的加入密钥以通过验证。