Product Decisions This Supports
- Architecture Modernization: Replace legacy Nginx+PHP-FPM stacks with a unified, high-performance PHP application server (RoadRunner) to reduce infrastructure complexity, improve scalability, and enable HTTP/2/3, gRPC, and WebSocket support natively.
- Microservices & Event-Driven Workflows: Adopt Temporal workflows and Kafka/RabbitMQ queue plugins to build resilient, stateful microservices without managing separate message brokers.
- Observability & Performance: Integrate OpenTelemetry (OTel) support for distributed tracing, metrics, and logging, reducing reliance on third-party APM tools.
- Cost Optimization: Reduce cloud spend by consolidating services (e.g., HTTP, queues, KV stores) into a single process with fine-grained resource control (CPU, memory, concurrency).
- Developer Productivity:
- Plugin-based extensibility (e.g., gRPC, WebSockets, Centrifugo for real-time) accelerates feature delivery.
- Hot-reload configuration (via
SIGUSR2) enables zero-downtime deployments.
- PSR-7/PSR-15 middleware standardizes HTTP handling (e.g., gzip, Prometheus metrics, OTEL).
- Roadmap Prioritization:
- Phase 1: Migrate high-traffic APIs from Nginx+FPM to RoadRunner (HTTP/2/3, gRPC).
- Phase 2: Replace custom queue workers with RoadRunner’s Kafka/SQS plugins and Temporal workflows.
- Phase 3: Adopt WebSockets (via Centrifugo) for real-time features (e.g., notifications, collaboration tools).
- Build vs. Buy:
- Buy: RoadRunner’s MIT license, Go-based performance, and plugin ecosystem justify adoption over building a custom solution.
- Customize: Extend RoadRunner with internal plugins (e.g., custom KV stores, auth middleware) via Go or PHP.
When to Consider This Package
Adopt RoadRunner When:
- Performance is Critical:
- Current PHP stack (e.g., Nginx+FPM) struggles with high concurrency (e.g., >10K RPS) or latency-sensitive workloads (e.g., APIs, real-time systems).
- Need HTTP/2/3, gRPC, or WebSocket support without adding proxies (e.g., Envoy).
- Infrastructure Complexity is High:
- Running multiple services (HTTP, queues, KV stores) with separate processes/VMs increases operational overhead.
- Want to consolidate into a single process with isolated workers (e.g., per-route or per-service).
- Event-Driven Architecture is a Priority:
- Building Temporal workflows, Kafka/SQS consumers, or distributed tasks requires minimal boilerplate.
- Need reliable retries, dead-letter queues, or saga patterns without managing a separate orchestrator.
- Observability is a Blocker:
- Lack distributed tracing (OTel) or metrics (Prometheus) in current stack.
- Need structured logging or performance insights without adding sidecars (e.g., Jaeger, Grafana).
- Developer Velocity is Key:
- Teams want to avoid Go/Python for backend logic but need Go’s performance for networking/queues.
- Prefer PHP-first development with PSR standards (PSR-7, PSR-15) for HTTP handling.
Look Elsewhere When:
- Legacy Monoliths: If the app is tightly coupled to FPM or Nginx modules (e.g., custom Lua scripts), migration effort may outweigh benefits.
- Non-PHP Workloads: For non-PHP services (e.g., Node.js, Go), RoadRunner’s PHP focus limits use cases.
- Strict Compliance Needs: Some enterprise security teams may hesitate due to Go’s dependency model (though MIT license and active CVE fixes mitigate this).
- Serverless Preferences: If using AWS Lambda/Fargate or Kubernetes with sidecar proxies (e.g., Envoy), RoadRunner’s process model may not align.
- Minimalist Requirements: For simple CRUD APIs with low traffic, Nginx+FPM or PHP built-in server (
php -S) may suffice.
How to Pitch It (Stakeholders)
For Executives (Business/Tech Leadership):
"RoadRunner lets us replace 3–5 infrastructure services (Nginx, FPM, RabbitMQ, Redis, etc.) with a single, high-performance PHP server—cutting cloud costs by 30% while improving API response times by 40%.
- Scale without hiring: Handle 10x more traffic with the same team by eliminating proxy bottlenecks.
- Future-proof: Built-in support for gRPC, WebSockets, and workflows enables real-time features (e.g., live dashboards, chat) without rewrites.
- Risk reduction: MIT-licensed, battle-tested (used by Spiral Scout, Temporal, and Laravel), with active CVE fixes and a Go-based core for stability.
- ROI: Payback period <6 months via lower ops costs and faster feature delivery."
Ask: "Should we prioritize this for our high-traffic APIs or event-driven services?"
For Engineering (DevOps/Backend Teams):
"RoadRunner replaces our Nginx+FPM+RabbitMQ stack with a unified PHP server that’s faster, simpler, and more extensible.
- Performance:
- HTTP/2/3 and gRPC out of the box (no Envoy needed).
- Lower latency than FPM (Go-based networking + worker pools).
- Operational Simplicity:
- Single binary (
rr serve) replaces Nginx, PHP-FPM, and queue workers.
- Hot-reload config (no restarts for
.rr.yaml changes).
- Built-in metrics (Prometheus) and tracing (OTel).
- Developer Experience:
- PSR-7/PSR-15 middleware for HTTP (e.g., gzip, auth, OTEL).
- Plugin ecosystem: Add Kafka, Temporal, Redis, WebSockets via YAML.
- PHP-first: Write workers in PHP; leverage Go for networking/queues.
- Migration Path:
- Start with HTTP APIs (replace Nginx+FPM).
- Add queues (replace Beanstalk/RabbitMQ).
- Enable gRPC/WebSockets for real-time features.
Trade-offs:
- Learning curve: Go-based config (
rr.yaml) and plugins (but docs are solid).
- Not a drop-in: Requires rewriting FPM workers as RoadRunner workers (but templates exist).
Proposal: Pilot with one high-traffic API to compare metrics vs. Nginx+FPM. If P99 latency improves by 20%, roll out to queues/workflows."
For Security/Compliance Teams:
"RoadRunner is MIT-licensed, actively maintained, and CVE-patched (e.g., Go 1.26+, dependency updates in v2025.1.x).
- Go Runtime: Less attack surface than PHP-FPM (no PHP vulnerabilities).
- Plugin Isolation: Workers run in sandboxed processes; misconfigurations won’t crash the server.
- Audit Trail:
- OpenTelemetry integration for request tracing.
- Prometheus metrics for anomaly detection.
- Compliance: Aligns with PSR standards (e.g., PSR-7 for HTTP) and cloud-native practices (e.g., gRPC for internal services).
Risk Mitigation:
- Air-gap testing: Run in a staging environment with network policies before production.
- Plugin review: Audit third-party plugins (e.g., Temporal, Kafka) via GitHub dependencies or Velox builds."
For Developers (Frontend/Backend):
"RoadRunner lets you write PHP workers but get Go-level performance for networking/queues.
- HTTP APIs:
- Queues/Workflows: