Systems architecture & ingress
Distributed. Self-aware. Fault-tolerant ingress for dynamic cloud infrastructure.
BRIDGE is a lightweight daemon (emphasis on lightweight) that runs on your VMs. It watches services spin up and down, builds an automatic routing table across your fleet, handles automatic cross-VM replication, and makes every node aware of every service, no matter where it lives.
Why BRIDGE exists
The infrastructure changes. How does the network know?
When you have several servers running different services, routing traffic to them is pure friction. Every deployment meant updating a stack of configurations across the board: SSH into the host, edit reverse proxy configs, validate syntax, reload, and hope nothing breaks in transit. Static gateway mappings become stale the moment dynamic containers move.
Worse, healthy infrastructure can still be unreachable. If an ingress bastion crashes, your application backends are running fine, but the outside world is cut off. Human-in-the-loop latency guarantees network downtime during unplanned failures: manual reconfiguration simply cannot keep up with dynamic cloud workloads.
BRIDGE eliminates that friction by making infrastructure aware of itself. A lightweight daemon on each VM watches services spin up and down, forms an encrypted WireGuard mesh, gossips health state, and autonomously elects an edge leader. If a leader or backend dies, traffic reroutes and the ingress hands off in milliseconds without human intervention. It makes a fleet of VMs work like one, bridging the brain so to speak.
What it does
Everything your fleet needs, in one lightweight binary
Autonomous ingress, encrypted overlay, and continuous health monitoring with zero external runtime dependencies.
Cross-fleet routing
One entry point, multiple servers. Ingress traffic routes point-to-point over WireGuard directly to healthy backends on any VM.
Plugs into your existing stack
Works alongside Traefik, Nginx, or whatever you already run. Choose L7 Direct HTTP, L4 SNI passthrough, or custom reverse proxies.
First-class Coolify support
Managed delegation mode pairs directly with your Coolify setup to bridge nodes and route dynamic multi-server deployments seamlessly.
Automatic routing table
Watches services spin up and down in real time. Makes every node aware of every service across your fleet, wherever it lives.
Automatic cross-VM replication
Critical workloads can replicate to peer nodes on failure, with automatic or manual failback and configurable cooldowns.
Self-aware SWIM gossip
Continuous heartbeat detection discovers cluster health (Alive → Suspected → Dead → Recovered), converging in seconds.
Autonomous leader election
Bully algorithm with configurable priorities elects one ingress leader. If it dies, another takes over instantly without human latency.
Dashboard & CLI
Embedded ops console on 127.0.0.1:9090, real-time WebSocket events, JSON API, and a fast CLI over Unix socket.
Architecture // One mind. Different bodies. Same goal.
A daemon on every node, a leader at the edge
A unified control plane running across distinct physical hosts, coordinating public traffic ingress and private workload dispatch.
Every VM runs the same lightweight BRIDGE daemon. Continuous SWIM gossip keeps node state synchronized, while leader election assigns the public ingress. If the active leader dies, another takes over instantly: continuous state, automatic decisions.
Under the hood // Deep-dive architecture
How BRIDGE works: From edge ingress to kernel WireGuard mesh
Cloudflare-grade routing without cloud lock-in. BRIDGE decouples public edge connectivity from private workload routing across multi-cloud or on-prem VMs using a high-throughput data plane and a zero-dependency epidemic control plane.
Kernel-level WireGuard overlay & deterministic mesh IP allocation
Rather than proxying inter-node traffic through userland sidecars or centralized bastion gateways,
BRIDGE creates a native WireGuard network interface (wg0) in the Linux kernel on each node.
- Deterministic Subnetting: Nodes bind to predictable virtual IP addresses on the private
10.8.0.0/24CIDR range (e.g.10.8.0.1,10.8.0.2). - Self-Sovereign Cryptography: High-performance Curve25519 keypairs are generated locally on boot or read from config. No external PKI or certificate authority needed.
- Point-to-Point UDP Encapsulation: Packets traverse port 51820 directly between node public IPs, authenticated and encrypted via ChaCha20-Poly1305.
- Dynamic AllowedIPs Programming: When a peer joins, BRIDGE configures
AllowedIPs = [<peer_ip>/32]inside the kernel routing table, preventing route spoofing.
# Telemetry from running daemon:
Interface: wg0
Mesh IP: 10.8.0.1/24
Listen Port: 51820 (UDP)
Public Key: 8fKx92...mQ2yL8=
Peers (2 active):
node-02:
Endpoint: 198.51.100.22:51820
AllowedIPs: 10.8.0.2/32
Handshake: 18s ago (transfer: 4.2 MB rx / 8.9 MB tx)
node-03:
Endpoint: 198.51.100.23:51820
AllowedIPs: 10.8.0.3/32
Handshake: 9s ago (transfer: 1.1 MB rx / 1.4 MB tx)
Packet pipeline
The life of a request across the BRIDGE fleet
From public ingress termination to WireGuard kernel encapsulation to container response.
Public Ingress
Client request hits the leader node via Cloudflare Tunnel, DNS failover, or floating Anycast IP.
Radix Route Match
Leader proxy inspects Host/SNI, looks up destination in memory, and selects target via consistent hash ring.
Kernel Encapsulation
Packet is routed into wg0 and encapsulated into ChaCha20-Poly1305 UDP frames across 10.8.0.x.
Zero-Copy Forward
Destination VM kernel decapsulates WireGuard frame and passes packet directly to local container socket.
Streamed Response
Container response traverses the established bidirectional TCP stream back to the waiting client.
Deployment
Three steps to a self-aware fleet
1. Install the daemon on each VM
One lightweight command installs the single binary, sets up a system user, and configures the systemd unit.
2. Nodes form the mesh & elect a leader
WireGuard links establish, gossip discovers peers in seconds, and the highest-priority live node takes the ingress.
3. Route seamlessly across the fleet
One entry point for multiple servers. As services spin up and down, BRIDGE updates the routing table automatically.