Reliability Infrastructure / Orchestr8, secured SQL databases
A self-healing proxy layer for many secured SQL databases
The database driver had a bug, even in its latest version: it poisoned connections without raising an error, so they stayed in the pool and failed the queries after them.
My role I took the existing proxy to production, traced the failures to the driver, and designed a self-healing runtime around its unchanged core.
Context Orchestr8
Key decision
Fix the cause, then contain what can't be fixed: a different driver, and a pool that restarts alone.
secured SQL databases rely on it, across production, customer testing and development
20+
The same proxy code runs as separate instances for production, customer testing and development.
Problem
A poisoned connection the driver never reported
- The driver poisons a connection and raises no error.
- It still looks healthy, so it goes back into the pool.
- Every later query that picks it up fails.
Insight
Picking the way out of a driver bug
Ruled out
Wait for a fix
The bug showed on our ARM servers, already on the latest driver. There was no fix to wait for.
Ruled out
Downgrade the driver
Swaps one set of bugs for another.
Ruled out
Move to x86
Gives up the cheaper servers.
Chosen
The most stable driver for ARM, and a runtime that heals itself
It recovers on its own, even from failures outside our code.
Mechanism
Redesigned around the core, not through it
- Every database has its own process, pool and quota in the proxy.
- A driver bug poisons one connection, silently. The runtime catches it and restarts only that pool.
- The other databases keep serving the whole time.
Before, every pool shared one runtime and its limits, so one bad connection could reach the rest. The core that talks SQL stayed exactly as it was.
Outcome
Built to be run, not just to connect
Recovers from outside failures
Even a connection the driver breaks silently gets its pool restarted.
Automatic recovery
Pools and connections are watched and brought back before anyone notices.
Real-time monitoring
Health, stuck queries and pool use, live for every database.
A reproducible driver setup
Installed and verified the same way on every host.
Stress tooling
Load tests across many databases set the limits, not guesses.
Same core, same callers
Every application kept its SQL interface unchanged.
A new design, not just error handling.
A failing pool now restarts alone
The runtime heals itself: when anything breaks, even outside our code, that database's pool starts clean while the others keep serving. The databases and every caller stay untouched.