Module 6 · Dual-rail failover blueprint自治雙通道架構與 Webhook 故障切換藍圖產生器
一鍵產生生產級 TypeScript、Python、Go 與 JSON 策略雙軌熔斷路由程式碼,內建 ISO 法規預檢門控與 DLR 回呼看門狗。
Combined SLA 99.999%ACK ≤ 4750msDLR watchdog 12s
Quick ISO:
seven.io (85%) → StartMessaging (15%) · EU_WEST · UA
1< 5ms GSM-7 / RFC check
OTP · 100,000/mo
2Quiet hours: 21:00–08:00 local time
National EU/EEA NRAs & GDPR Art. 28 · dynamic_alphanumeric_ok
3ACK budget: 4750ms
85% Primary / 15% Standby · Rolling 5m DLR ≥ 92%
499.96% 90d SLA
85% allocation · corridor leader (EU_WEST)
599.999% combined SLA
15% active warm + instant <2s overflow
6Watchdog TTL: 12s
Auto-retry on carrier silence or grey-route drop
所選 ISO 通道在正式流量前的監管要求。 · UA
- 主管機關
- Sender ID 政策
- 強制要求
- 安靜時段
- 最大串接段數
開啟通道檔案 →Validate latency, quantify outage ROI, then launch Decision Brief with the same corridor.
面向 TypeScript、Python、Go 的正式環境斷路器範本與機器可讀 JSON 政策。
// IOSOR 2027 Autonomous Dual-Rail Router (EU_WEST · UA · OTP)
export interface DispatchPayload {
to: string;
body: string;
idempotencyKey: string;
}
export const ROUTING_BLUEPRINT = {
corridor: 'EU_WEST',
isoCountry: 'UA',
scenario: 'otp',
primary: { id: 'sevenio', name: 'seven.io', weight: 0.85 },
failover: { id: 'startmessaging', name: 'StartMessaging', weight: 0.15 },
ackTimeoutMs: 4750,
dlrWatchdogSec: 12,
maxSegments: 6,
} as const;
export async function dispatchWithDualRailFailover(
payload: DispatchPayload,
sendViaPartner: (partnerId: string, p: DispatchPayload, signal: AbortSignal) => Promise<{ messageId: string }>
) {
const controller = new AbortController();
const timer = setTimeout(() => controller.abort(), ROUTING_BLUEPRINT.ackTimeoutMs);
try {
const res = await sendViaPartner(ROUTING_BLUEPRINT.primary.id, payload, controller.signal);
return { rail: 'primary', partnerId: ROUTING_BLUEPRINT.primary.id, ...res };
} catch {
const fallbackController = new AbortController();
const res = await sendViaPartner(ROUTING_BLUEPRINT.failover.id, payload, fallbackController.signal);
return { rail: 'failover', partnerId: ROUTING_BLUEPRINT.failover.id, ...res };
} finally {
clearTimeout(timer);
}
}