Skip to content

Fast International Ferry — WebSocket Streaming

Pre-configured for cross-cloud LoadBalancer discovery. Securely streams real-time, bi-directional data across regional boundaries via a persistent Layer 4 tunnel.

Tags: Armored Tunnel | Multi-cluster | WebSocket | 2 Pods


Overview

The Fast International Ferry extends the Fast Ferry topology across two Kubernetes clusters. The WebSocket Initiator (ws-initiator) runs in Cluster A; the WebSocket Terminator (ws-terminator) runs in Cluster B. The WoSP tunnel spans the cluster boundary using LoadBalancer IPs for cross-cluster addressing.

Armored Tunnel mode (xtra4) provides per-session key rotation. The persistent WebSocket connection is maintained across the cluster boundary for the duration of the session.

flowchart TD
    subgraph ClusterA["Cluster A"]
        A["Gateway / Initiator\n(ws-initiator)"]
    end
    subgraph ClusterB["Cluster B"]
        B["Sink / Terminator\n(ws-terminator)"]
    end
    A -->|"WoSP xtra4\nLoadBalancer IP"| B

Use Cases

  • Cross-region real-time data streaming
  • Bi-directional telemetry between geographically separated clusters
  • Secure streaming relay across cloud provider boundaries
  • Edge-to-cloud WebSocket tunneling

Multi-cluster port mapping

Cross-cluster connections require LoadBalancer IPs and port mappings to be known before the gateway cluster is deployed. For local k3d testing, create each cluster with --port flags at creation time and use host.k3d.internal for cross-cluster addressing. See Multi-Cluster Guide.

Bundle Contents

fast-international-ferry/
├── initiator/          ← ws-initiator (Cluster A)
├── terminator/         ← ws-terminator (Cluster B)
├── deploy-cluster-a.sh
├── deploy-cluster-b.sh
├── teardown.sh
├── blueprint.yaml
├── README.md
└── EULA.md

Deploy

Create two k3d clusters with port mappings first:

k3d cluster create cluster-a --port "30100:30100@loadbalancer" --agents 1
k3d cluster create cluster-b --port "30200:30200@loadbalancer" --agents 1

Deploy Cluster B (terminator) first — its LoadBalancer IP is needed by Cluster A:

kubectl config use-context k3d-cluster-b
cd terminator/app/ && docker build -t serial-app-wosp-node:latest . && k3d image import serial-app-wosp-node:latest -c cluster-b
cd ../..
bash deploy-cluster-b.sh

kubectl config use-context k3d-cluster-a
cd initiator/app/ && docker build -t serial-app-wosp-node:latest . && k3d image import serial-app-wosp-node:latest -c cluster-a
cd ../..
bash deploy-cluster-a.sh

Deploy Cluster B first, record its LoadBalancer IP, then deploy Cluster A. See Multi-Cluster Guide.

Verify

kubectl logs -n fast-international-ferry-initiator-ns \
  deployment/initiator -c web-app -f

Expected output:

🔁 Auto-trigger starting — sending 5 messages
🔁 Auto-trigger complete — 5/5 messages sent.

The "trail" in /output results will show pod names from both clusters.

Customize

Hook functions for this blueprint:

  • on_trigger(payload, headers) — in initiator/app/app.py
  • on_receive_terminator(payload) — in terminator/app/app.py

See Hook Functions Reference.

Pricing

2 WoSP units (1 per pod). See Commercial Licensing.