HeadlinesBriefing favicon HeadlinesBriefing.com

World's Fastest PHP Webserver Outperforms FPM and Swoole

Hacker News •
×

A new single-file PHP webserver claims to be faster than Swoole, FrankenPHP, and standard PHP-FPM without requiring extensions, Docker, or code modifications. The project, hosted on GitHub, can be deployed via a simple git clone or by running a self-contained binary. It replaces entire stacks of nginx, PHP-FPM, Node, Redis, and supervisor within one process.

Benchmarks indicate it achieves 14 times the throughput of PHP-FPM on CPU-bound workloads and up to 24 times on I/O-bound tasks with 50ms latency. On real database loads simulating 200ms latency, the server shows 10 to 25 times the performance of competitors. The architecture uses persistent workers with copy-on-write memory optimization.

By loading the framework into a parent process and forking workers, the kernel shares loaded classes. Workers only pay for memory pages written during requests, allowing thousands of workers on minimal RAM. A WordPress-like request dirties only 30 pages, consuming roughly 120KB per worker.

The server supports WebSockets, Rooms, microservice isolation, clustering with SQLite replication, and auto-generated API documentation. It includes TLS support, a built-in cron scheduler, and buffered access logs with daily rotation.