Live from a Raspberry Pi 4 · Mexicali connecting to the Pi…

Project 02 · infrastructure / observabilityin operation

Control room

Per-process routing, automatic failover and frozen-instance detection.

Per-process network orchestrator for Windows: pins each instance of an application to a different network egress (proxy or local ISP), fails over automatically when an egress dies, detects frozen instances by image and deploys itself from git. All in PowerShell 5.1, without injecting code into the application it manages.

Instances
32
design ceiling · 23 to 26 in operation
Network egresses
7
6 proxies + ISP · 8 per bucket
Injected code
0
kernel-level routing
Failures to mark down
2
anti-flapping
Deploy cycle
≤10 min
with automatic rollback
Lines of PowerShell
~3,000
6 pieces · 1 config file

Fig. 1 · Animated demo · simulated data, real model

Seven steps on loop: normal ops, outage, failover, repair, return, freeze, restart

1/7

0
0
0
0

Each room is a bucket, each screen an instance. The top strip shows real numbers the rig pushes to this Pi when it is online. Narration is in Spanish.

Fig. 2 · The problem

Same executable, 32 times, each through a different IP. And the application cannot be touched.

Each instance must always leave through the same egress, even when the process restarts. If a proxy dies its instances have to keep working with no human intervention and come back on their own when it recovers. The box is managed over remote desktop and sometimes reboots itself for Windows Update, so everything must recover with nobody connected.

Fig. 3 · Constraints that make the problem interesting

  1. 01No code injection into the application because of its anti-tamper system. Rules out DLL-based proxifying.kernel
  2. 02Every instance is the same executable. Tools that route by program name are useless.by PID
  3. 03PowerShell 5.1, not 7: no ternary, try/catch the parser accepts and the runtime rejects, a locale that corrupts non-ASCII bytes.pure ASCII
  4. 04The box reboots on its own. Nothing can depend on someone being logged in.autonomous

The instance → bucket assignment is persisted in a ledger keyed by window number, which survives process restarts. The PID does not.

Fig. 4 · How it is solved

Routing

Proxifier (a kernel-level filter driver) routes by PID. A manager watches processes, groups them into buckets and regenerates the profile whenever the topology changes.

Leak prevention

Strict mode: anything without a rule is blocked, not passed through. Plus a firewall rule against QUIC (UDP 443), where browsers leak the real IP.

Failover

A watcher marks a proxy down after two consecutive failures. Its instances are spread across healthy ones, never to the ISP. The ledger stays put, so they return on recovery.

Freeze detection

Captures each window from the Windows compositor, not the app, and compares 64×36 greyscale fingerprints. A live 3D client never produces two identical frames; a frozen one does.

Deployment

The box tracks a deploy branch. Every 10 minutes it fetches; on a new commit it stops, resets, verifies everything is ASCII and parses, and starts. On failure it reverts to the previous commit.

Observability

Dashboard served by the stack itself: instances with bucket and egress IP, occupancy, failover in progress, 24 h proxy latency. Reads atomically written JSON.