RoadRunner
A high-performance PHP application server and process manager written in Go, powered by plugins
Repository Health
Technical Analysis
RoadRunner is a standalone application server, written in Go, that runs PHP applications as long-lived worker processes instead of restarting the PHP runtime on every request. It communicates with PHP workers over a binary RPC protocol and exposes a plugin architecture covering PSR-7/PSR-15 HTTP serving, RPC, job queues (AMQP, Beanstalk, SQS, Kafka, NATS), key-value storage, gRPC, WebSockets/Centrifuge, cron jobs, and metrics.
Because PHP application state is bootstrapped once per worker and reused across requests, RoadRunner eliminates the cold-start overhead of traditional PHP-FPM request handling, delivering substantially higher throughput for frameworks like Laravel, Symfony, and Spiral. It ships as a single Go binary (rr) configured via a .rr.yaml file, with the spiral/roadrunner Composer package acting as a metapackage that documents the PHP-side integration.
What You Get
- A single Go binary (
rr) that supervises PHP worker processes and restarts them on crash or memory limits - PSR-7/PSR-15-compliant HTTP serving with static file, gzip, and TLS support built in
- A plugin system covering RPC, job queues (AMQP, Beanstalk, SQS, Kafka, NATS), KV storage, gRPC, and Centrifuge WebSockets
- YAML-based configuration (
.rr.yaml) with hot-reload support for most plugins - First-class integration packages for Laravel, Symfony, and the Spiral framework
Common Use Cases
- Running Laravel or Symfony applications with persistent workers to cut per-request bootstrap overhead
- Building PHP microservices that need gRPC or long-lived WebSocket connections
- Offloading background job processing to RoadRunner’s queue plugins (AMQP/SQS/Beanstalk) from a PHP codebase
- Replacing PHP-FPM + Nginx with a single self-contained binary in containerized deployments
Under The Hood
Architecture — RoadRunner is a Go application (cmd/rr/main.go) built on the endure dependency-injection/plugin container (container/), which wires together independently versioned plugin modules (HTTP, RPC, queue drivers, KV, gRPC) declared in go.mod as separate roadrunner-server/* packages; PHP workers communicate with the Go process over a binary RPC protocol defined in the spiral/roadrunner PHP-side library. Tech Stack — Written in Go 1.26 with a large set of first-party plugin modules (roadrunner-server/amqp, beanstalk, boltdb, centrifuge, config, endure, fileserver, etc.) pinned via go.work, plus supporting libraries like fatih/color and olekukonko/tablewriter for CLI output; the PHP side is distributed as a Composer metapackage with no runtime code of its own. Code Quality — The cmd/rr and container packages carry direct Go test files (command_test.go, container_test.go, config_test.go), and a top-level tests/ directory plus .golangci.yml linter configuration and Codecov integration enforce coverage and style across the plugin ecosystem. API Design — Configuration is centralized in a single .rr.yaml file per deployment, and the plugin container auto-wires dependencies via endure, so adding a capability (e.g. gRPC or a new queue driver) is a matter of listing the plugin and its config block rather than writing glue code.