Beyond PHP-FPM: Modern PHP Application Servers

by | Jun 12, 2025

For decades, PHP has powered the web using a simple model: process a request, send a response, then shut down. This model, especially in the form of CGI and PHP-FPM, is easy to understand but increasingly inefficient for modern web demands.

The Traditional Model: CGI and PHP-FPM

In the CGI model, every web request starts a new PHP process from scratch. This is slow and costs many resources. PHP-FPM improved things by keeping a pool of PHP processes running, reducing startup time. Still, each request:

  • Runs in isolation (no shared memory between requests)
  • Requires reloading the entire application
  • Ties up an entire process per request

This limits performance, especially under high load or for real-time features.

At Icinga, we currently use PHP-FPM to power our web interface, but we’re actively exploring modern alternatives – especially options that can offer better performance and resource efficiency under load.

Modern Alternatives

Today, several new tools offer a smarter way to run PHP: keeping your app in memory, sharing resources across requests, and handling more traffic with fewer resources. This shift may require smaller to huge adjustments for legacy applications and should be taken into account when building new ones.

FrankenPHP

FrankenPHP is a new kind of PHP application server that embeds the PHP runtime directly into the Caddy web server, which is written in Go. In classic mode it can act as a drop-in replacement for PHP-FPM, offering immediate performance improvements without changing your code. Beyond that, it supports a powerful worker mode, where your PHP application is booted once and stays in memory, allowing requests to be handled without reinitializing the entire app each time. This drastically reduces latency and resource consumption, and it also brings modern features like HTTP/3, automatic TLS, and built-in real-time capabilities.

Pros:

  • Drop-in replacement for PHP-FPM in classic mode
  • Supports HTTP/3, TLS
  • Even real-time features

Cons:

  • Relatively new, with a smaller community
  • Not yet so battle-tested

RoadRunner

RoadRunner is a high-performance PHP application server written in Go that manages persistent PHP worker processes. Instead of spinning up and shutting down a PHP runtime for each request, RoadRunner keeps your app loaded in memory and routes requests through a fast internal bridge. This approach removes the typical startup overhead, improves concurrency, and lowers CPU and memory usage under load. It also comes with a plugin system that supports things like queue handling, gRPC, and static file serving – making it especially well suited for APIs, micro services, and applications with high throughput.

Pros:

  • No request bootstrapping
  • Integrates well with frameworks like Laravel or Symfony
  • Supports plugins for queues, gRPC, file serving, …

Cons:

  • More complex configuration and debugging

OpenSwoole

OpenSwoole is a PHP extension that brings asynchronous programming and coroutine-based concurrency to PHP, enabling a completely different way of building and running applications. With OpenSwoole, your PHP code runs in a long lived process and uses an event loop to handle thousands of simultaneous connections, much like Node.js or Go. This model allows for real time features, non blocking I/O, and efficient resource use, making it ideal for building chat servers, streaming applications, or other services that need to handle many users at once. However, it requires adopting a different coding style and working with OpenSwoole’s own APIs.

Pros:

  • Super high concurrency
  • Great for real-time apps (e.g. chat, games)

Cons:

  • Requires different coding model and use of custom APIs
  • Not compatible with many traditional PHP libraries
  • Steeper learning curve for devs new to async programming

Quick Comparison

Feature

FrankenPHP

RoadRunner

OpenSwoole

Setup   

Easy to moderate
Easy in classic mode; Moderate in worker mode

Moderate
Requires config and app-level integration

Complex
Needs custom server script and async design

Performance   

High
Faster than FPM, especially in worker mode

High
Persistent workers avoid cold starts

Very High
Async event loop handles thousands of connections

PHP Compatibility   

Good to very good
Very good in classic mode, works out of the box; Good in worker mode, will need some adaption

Good
Requires some adaptation

Low
Uses custom APIs and requires async-friendly code

Concurrency Model   

Multi-threaded (in Go via Caddy)

Multi-process with fast inter-process messaging

Single-threaded event loop + coroutines

Ideal Use Case   

Upgrading legacy apps, traditional web projects

APIs, background jobs, scalable services

Real-time systems, WebSockets, highly concurrent apps

Maturity   

New
Emerging, not yet widely battle-tested

Mature
Used in production, active development

Mature
Original Swoole widely adopted, esp. in Asia

Conclusion

PHP is evolving. While PHP-FPM still works well for many sites, tools like FrankenPHP, RoadRunner, and OpenSwoole show what’s possible when PHP is treated as a long-running application server. If you’re building something modern and fast, these are worth exploring.

You May Also Like…

Icinga 2 DSL – Variable Scopes

Icinga 2 DSL – Variable Scopes

Ever wondered how Icinga 2 manages all those variables, and how it knows which one to use? In this blog post, we will...

Subscribe to our Newsletter

A monthly digest of the latest Icinga news, releases, articles and community topics.