petr_sys12 Jun 2026 18:24

We are about to put a Laravel monolith behind a long-running PHP server and the choice is between RoadRunner and Swoole, via Octane in both cases. I have read the marketing on both sides. What I have not found is people who ran both in production on the same workload and can say where each one actually hurt.

My concrete worries: how leak-prone is each, how good is the debugging story when something goes wrong inside a long-lived worker, and whether the Go-based RoadRunner runtime makes deployment simpler or just moves the pain. Real numbers and war stories welcome.

Replies (5)
wzhang12 Jun 2026 18:54

Ran both. The big practical difference: Swoole gives you real coroutines, so concurrent I/O inside one request is possible, while RoadRunner is a worker-per-request model with no in-request concurrency. If your app is plain Laravel that does sequential queries, you do not benefit from Swoole coroutines and RoadRunner is simpler to reason about. If you want to fan out HTTP calls concurrently inside a request, Swoole wins, but you inherit the coroutine-safety burden.

0
tobw12 Jun 2026 20:04

Deployment-wise RoadRunner is a single static Go binary, which is genuinely nice, no PHP extension to compile and match against your PHP build. Swoole is a PECL extension tied to your exact PHP version, so every PHP upgrade means rebuilding it. We got bitten on a minor PHP bump where the prebuilt Swoole did not exist yet. If your ops team dislikes compiling extensions, that alone can decide it.

0
dmitry_kv12 Jun 2026 21:44

On leaks they are equally unforgiving because the root cause is the same: state surviving between requests. The difference is debugging. With RoadRunner the worker is plain PHP so xdebug and stack traces behave normally. With Swoole you are in coroutine land and a stack trace can be confusing because the scheduler interleaves things. We found RoadRunner easier to debug, Swoole faster under I/O-bound concurrency. Pick the axis that matters for your traffic.

0
petr_sys12 Jun 2026 23:14

This is exactly the framing I needed. Our app is sequential CRUD with very little fan-out, so the Swoole coroutine advantage is mostly wasted on us, and the single-binary deploy plus normal debugging tilts us toward RoadRunner. Good to hear the leak surface is the same either way, that was my fear that one would be dramatically safer.

0
dmytro_lv13 Jun 2026 00:54

One number from us: switching a mostly-sequential API from FPM to RoadRunner roughly tripled throughput per box just from skipping bootstrap on every request. Moving from RoadRunner to Swoole on the same app added maybe ten percent more, not worth the added complexity for us. The bootstrap-skip is where the real win is, the runtime choice is second order unless you are I/O fan-out heavy.

0
Write a reply
Markdown. ```php blocks are runnable.