RoadRunner
The Spiral Scout team has exemplified innovation at its finest with its latest open-source tool, RoadRunner. A unique and powerful integration of PHP and Golang, RoadRunner is modernizing PHP applications in ways developers have never seen before.
Greater speed, improved efficiency, more stability - as an MIT-licensed high-performance PHP server, open-source load balancer, and PHP process manager, RoadRunner has become a catalyst for innovation and growth among several Spiral Scout clients and beyond. It allows software developers to maximize their development stacks and write smaller PHP applications with simpler, cleaner code that can manage operations faster and more efficiently than ever.
The Challenge
The idea for RoadRunner was sparked in part by the frustration of Spiral Scout developers who were trying to handle long-live PHP scripts for an enterprise-level client. Even with the advancements made with PHP7, the standard execution model of PHP made balancing the client’s API backend difficult and during sporadic bursts of requests, it would often experience 502 errors.


The Approach
That’s when the Spiral Scout team decided to try using Golang to create a PHP application server that could take on the heavy loading of more trivial tasks, like handling HTTP requests and eliminating per request bootloading. Offloading these unnecessary operations from PHP to a more optimized frontend server completely transformed how the software functioned. RoadRunner effectively swapped out the classic setup of Nginx+FPM with a PHP/Golang application that boosted flexibility and performance.
Key features of RoadRunner include:
-
Ready to install and be used in production
-
Windows compatible
-
Offers HTTPS and HTTP/2 Push support
-
Supports effortless customization
-
Facilitates flexible configuration of environments
-
Zero PHP dependencies required, drop-in bridge to gRPC (Goridge)
-
Features PHP load balancer, task pipeline, and process manager
-
Frontend agnostic (gRPC, PSR-7, Queue, etc)
-
Works over standard pipes, TCP, and Unix sockets
-
Generates safe PHP process destruction and automated worker replacement
-
Timely worker lifecycle management (timeouts for create, allocate, and destroy)
-
Payload body and context
-
Allows for control over maximum jobs per worker
-
High-speed (using 16 threads it handles about ~250k RPC calls a second on Ryzen 1700X)
-
Includes a fail-switch for memory leaks
-
Provides for protocol, worker, and job level error management
-
Agile PSR-7 HTTP server (error handling, file uploads, static files, event listeners, middlewares, hot reload)

The Result
Not only was the application as a whole sped up significantly, but the number of servers needed to support it was cut by two-thirds. In some instances, the implementation of RoadRunner made applications 40x faster! Since then, RoadRunner has been integrated with the Symfony, Laravel, Slim, CakePHP frameworks and has added support for HTTPS, HTTP/2, plugins, and PSR-17.
“For years we thought about application infrastructure as a black box, singular unto itself. RoadRunner changed all that. Now we see the application infrastructure as an integral part of every project.”
Thinking Ahead
Spiral Scout developers are passionate about creating open-source solutions that help solve software engineering problems in smart, practical ways. Open-source technology both promotes innovation and broad engagement across the software development community as well as encourages companies to challenge themselves and reinvent how existing languages and frameworks can work together.