From c47141bc6b772c07ce278f0ef6b2d3a10359bb4a Mon Sep 17 00:00:00 2001 From: Gregory Magarshak Date: Mon, 20 Jul 2026 12:36:23 -0400 Subject: [PATCH] Updated README to highlight the ability to handle 10x more traffic --- README.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2644238..16c986c 100644 --- a/README.md +++ b/README.md @@ -3,19 +3,38 @@ A pure PHP web server. No nginx, no Apache, no php-fpm. One process serves static files, PHP scripts, WebSocket connections, and a live dashboard. +### ๐Ÿ”Ÿโœ–๏ธ 10x more concurrent PHP on the same hardware + +The biggest bottleneck in PHP hosting is **memory**. Each php-fpm worker loads your +entire framework independently โ€” 30โ€“60MB per worker. On an 8GB server, that's ~160 +workers max. That's your ceiling for concurrent PHP requests. + +Qbix Server forks workers **after** loading your classes. Thanks to copy-on-write, +all that shared code (framework, config, autoloader) uses memory only once. Each +worker adds only ~5MB for its per-request data: + +``` +php-fpm: 8GB รท 50MB per worker = 160 concurrent PHP requests +Qbix Server: 8GB รท 5MB per worker = 1,600 concurrent PHP requests +``` + +Same hardware. Same PHP code. **10x more users served.** + ### Why it's faster than nginx + php-fpm for real apps | | nginx + php-fpm | Qbix Server | |---|---|---| | ๐Ÿš€ **PHP request speed** | 10โ€“50ms bootstrap on *every* request | **0ms** โ€” workers fork after classes are loaded | -| ๐Ÿ’พ **Memory** | 30โ€“60MB ร— N workers (duplicated) | 30MB shared + ~5MB per worker (copy-on-write) | +| ๐Ÿ’พ **Memory per worker** | 30โ€“60MB each (duplicated) | ~5MB each (shared base via copy-on-write) | +| ๐Ÿ‘ฅ **Concurrent PHP** (8GB) | ~160 workers | **~1,600 workers** | | ๐Ÿ”’ **Access-controlled files** | Public URLs or hacky rewrites | `X-Accel-Redirect` โ€” PHP checks access, server streams the file | | ๐Ÿงฉ **Cache invalidation** | Whole-page only (purge everything) | `X-Cache-Tree` โ€” invalidate one component, keep the rest cached | | ๐ŸŒ **WebSocket** | Needs a separate server | Built in | | โš™๏ธ **Setup** | Install nginx, configure proxy_pass, php-fpm pool, sockets... | `php qbixserver.php --port=8080` | Static file throughput is 55โ€“73% of nginx (C will always beat PHP on raw I/O). -But on **actual PHP workloads**, the bootstrap savings make this **2โ€“5x faster**. +But on **actual PHP workloads**, the memory and bootstrap savings make this +dramatically faster and more scalable. > ๐Ÿ’ก You can always put nginx, a reverse proxy, or a CDN (Cloudflare, CloudFront) > in front of this for faster HTTPS and edge caching. Qbix Server handles the