insidestyles/swoole-bridge-bundle
Symfony bundle that bridges Swoole with your application, enabling high-performance coroutine-based HTTP serving from long-running workers while handling request lifecycle and service resets safely between requests.
Swoole\Http\Request into framework requests, managing the DI container lifecycle across requests, and resetting state between them. That's non-trivial bespoke infrastructure. The decision is: maintain ~hundreds of lines of in-house bootstrap code, or take a dependency.Consider it when:
Look elsewhere when:
exit()/die() calls, or packages that assume a fresh process will break under persistent workers — and no bridge fixes that for you.To executives: This is infrastructure plumbing that lets an existing PHP application run inside Swoole's persistent-worker model rather than the traditional one-process-per-request model. The upside is real: meaningfully higher throughput and lower per-request latency, which translates into fewer instances and lower cloud spend for the same traffic. The downside is operational complexity and dependency risk — the package is small, has essentially no adoption, and would become code we own. Recommendation: fund a timeboxed spike with a benchmark gate, not a production commitment.
To engineering: Treat this as a two-week experiment, not an adoption. Stand up a representative endpoint under PHP-FPM and under the bridged Swoole runtime; measure req/s, p95/p99, memory growth over 50k+ requests, and instance-count delta. Gate the go/no-go on memory stability and a credible maintenance story (pin + vendor + named owner for the fork). Separately, budget the statefulness audit — that work is required for any persistent-worker runtime and is usually the real cost. And before all of it: if the target app is Laravel, redirect the effort to Laravel Octane, which solves the same problem with first-party support and a far larger user base.
The decision ask: approve the spike and the benchmark, and defer the build-vs-buy call until you have latency/cost numbers and a clear-eyed read on maintenance risk.
How can I help you explore Laravel packages today?