I built the fastest PHP webserver in the world
Recorded: Sept. 19, 2026, 4:09 p.m.
| Original | Summarized |
Qbix Server — A Web Server in Pure PHP A web server in pure PHP Or grab a self-contained binary curl -LO https://github.com/Qbix/webserver/releases/latest/download/qbixserver-linux-x86_64 View on GitHub Everything in one process ⚡14× ThroughputPersistent workers at 120KB each. 400 workers on 200MB. 1,060 req/s where fpm does 78.Learn more → 14×vs fpm (50ms I/O) 💡 Why it’s faster than everything else The vast majority of PHP code — WordPress plugins, Laravel packages, every PDO::query() and file_get_contents() ever written — uses blocking I/O. Swoole’s coroutines can’t help with code that doesn’t yield. FrankenPHP and RoadRunner use the same worker-count-limited model as fpm. 🔍 Benchmarks vs Swoole, FrankenPHP, and php-fpm CPU-bound (WordPress-like workload, same 200MB): Workersreq/svs fpm I/O-bound (50ms database query): Workersreq/svs fpm I/O-bound (200ms — real database load): Workersreq/svs fpm * Swoole coroutines require Runtime::enableCoroutine() and coroutine-aware drivers. Unmodified WordPress/Laravel uses blocking I/O and hits fpm’s ceiling. 🛡️ 28 functions shimmed — how state gets reset Workers are persistent — they handle thousands of requests without restarting. Between each request, a Reflection-based snapshot restores all static properties in 0.03ms. 28 PHP functions are intercepted via source transformation at include time: 📊 How many users can one $30/month machine handle? Metricphp-fpmQbix One machine. No database server, no Redis, no Node, no Docker. Add a second with DNS failover for redundancy — distributed mode keeps both SQLite copies in sync. Fork after preload Live Dashboard Get started Qbix ServerSource on GitHubCompatibilityReleasesQbix PlatformOverviewSourceCommunityLinksExamplesDocumentationv1.1 — Boldly Go |
Qbix Server is presented as a web server built entirely in pure PHP, designed to offer superior performance compared to existing solutions like Swoole, FrankenPHP, and RoadRunner, especially when operating on unmodified code without relying on extensions, adapters, or Docker. Its core architectural principle involves managing numerous workers efficiently, fundamentally differing from coroutine-based approaches. Instead of leveraging coroutines to handle blocking I/O, Qbix utilizes a model based on process forking. The server first loads the entire framework into a parent process and then uses pcntl_fork() to create isolated workers. This method leverages the operating system's copy-on-write (COW) mechanism, allowing workers to share the loaded classes while only paying for the memory pages they actively modify during a request, which results in significantly lower overhead per worker. The system achieves high throughput by running many workers, each consuming only 120 kilobytes of memory, as opposed to the larger memory footprints seen in other systems. This approach allows for handling an extremely large number of concurrent requests, demonstrated by achieving 1,060 requests per second within the framework context, far surpassing the limits of traditional PHP-FPM. This design is highlighted by the fact that blocking I/O, common in many PHP operations such as PDO queries, is mitigated by having sufficient worker capacity, as blocking does not impede the overall system when many processes are active. Qbix Server provides a comprehensive, integrated operational environment, consolidating functionalities typically managed by separate components like nginx, FPM, Redis, supervisor, and Docker into a single process. It natively supports WebSocket communication through a shared port, enabling the implementation of rooms for forked processes with shared state, adhering to the Socket.IO protocol without requiring a separate Node.js environment. Furthermore, the server maintains compatibility with popular frameworks such as WordPress, Laravel, Symfony, and Drupal by shimming twenty-eight essential functions at the time of inclusion, allowing unmodified PHP code to function seamlessly while ensuring shared-nothing safety and state resets between requests with minimal overhead, typically within 0.03 milliseconds by restoring static properties through reflection-based snapshots. Security and observability are also intrinsic to the design. The server includes features such as automatic HTTPS initiation when certificates are present, built-in cron scheduling, and buffered access logging with daily rotation and gzip archiving. It also incorporates advanced response header generation, including mechanisms like X-Cache-Tree for invalidation, X-Accel-Redirect for access control, and ETag generation. Automating documentation generation is another key feature, allowing the server to automatically generate OpenAPI 3.1 and MCP specifications, facilitating integration with tools like Swagger UI and Postman. In terms of scalability, Qbix Server supports cluster replication using SQLite databases, where events replicate between multiple servers, ensuring that performance and state are maintained even if a node fails. This distributed mode allows for redundancy, as the system can automatically synchronize data across nodes. The architecture supports handling substantial user loads, indicating that a single machine can manage up to approximately 40,000 concurrent active users and over 800,000 registered accounts, provided the database handling is managed efficiently. The system allows users to manage and monitor performance via a built-in live dashboard, eliminating the need for external monitoring solutions like Grafana or Prometheus. |