Esta página se muestra en inglés. Una traducción al español está en curso.
ScriptsMay 19, 2026·3 min de lectura

RoadRunner — High-Performance PHP Application Server in Go

RoadRunner is a PHP application server written in Go that keeps PHP workers alive between requests, dramatically reducing bootstrap overhead and enabling gRPC, queues, and cron from a single binary.

Listo para agents

Este activo puede ser leído e instalado directamente por agents

TokRepo expone un comando CLI universal, contrato de instalación, metadata JSON, plan según adaptador y contenido raw para que los agents evalúen compatibilidad, riesgo y próximos pasos.

Native · 98/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
RoadRunner Overview
Comando CLI universal
npx tokrepo install 2d9afef1-53c1-11f1-9bc6-00163e2b0d79

Introduction

RoadRunner replaces PHP-FPM with a Go-based process manager that keeps PHP workers alive between requests. This eliminates per-request bootstrap costs and adds built-in support for HTTP, gRPC, job queues, temporal workflows, and more through a single binary.

What RoadRunner Does

  • Serves PHP applications with persistent worker processes
  • Eliminates per-request bootstrap overhead by keeping workers alive
  • Provides built-in HTTP/2, gRPC, WebSocket, and TCP servers
  • Includes a job queue system with drivers for AMQP, Kafka, SQS, and more
  • Offers health checks, metrics, and service discovery features

Architecture Overview

RoadRunner is a Go binary that spawns and manages PHP worker processes. Each worker loads the PHP application once and then handles multiple requests over a binary protocol pipe (stdin/stdout or TCP sockets). The Go layer handles networking, TLS termination, load balancing across workers, and plugin execution. Plugins extend RoadRunner with additional capabilities like KV storage, metrics export, and job processing.

Self-Hosting & Configuration

  • Download the binary via vendor/bin/rr get or from GitHub releases
  • Configure with a .rr.yaml file at the project root
  • Set worker count and memory limits per plugin section
  • Enable plugins (http, grpc, jobs, kv) in the YAML config
  • Run with ./rr serve and reload workers with ./rr reset

Key Features

  • Persistent PHP workers eliminate framework bootstrap on every request
  • Single binary with HTTP, gRPC, queues, and cron in one process
  • Plugin architecture written in Go for extending server capabilities
  • Worker memory limit enforcement with automatic restart
  • Built-in Prometheus metrics endpoint

Comparison with Similar Tools

  • PHP-FPM — spawns new process per request; RoadRunner keeps workers alive for lower latency
  • Swoole — PHP C extension with async I/O; RoadRunner uses Go for the server layer and standard PHP workers
  • FrankenPHP — embeds PHP in Caddy; RoadRunner uses a separate Go binary with a worker pool model
  • Laravel Octane — uses RoadRunner or Swoole as backends; RoadRunner is the underlying server
  • Nginx Unit — polyglot app server; RoadRunner is PHP-focused with deeper PHP ecosystem integration

FAQ

Q: Does RoadRunner work with Laravel and Symfony? A: Yes. Laravel Octane supports RoadRunner natively, and Spiral Framework is built specifically for it. Symfony has community adapters.

Q: Do I need to change my PHP code for RoadRunner? A: Most applications work with minimal changes. You need to avoid global state pollution since workers persist between requests.

Q: How does RoadRunner handle memory leaks? A: Workers are automatically restarted after reaching a configurable memory limit or maximum number of requests.

Q: Can RoadRunner replace Nginx? A: RoadRunner can serve HTTP directly but is often placed behind a reverse proxy like Nginx or Caddy for static files and TLS in production.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados