logoalt Hacker News

EGregtoday at 7:41 AM1 replyview on HN

Not at all. You are probably thinking of evented programming that happens in Node, Swoole or FrankenPHP. Qbix server makes sure each PHP process is isolated, so you also don’t leak any memory or secrets across requests.

Out of all runtimes powering web servers today, I like PHP the most for its shared-nothing architecture, preventing a whole lot of security bugs by default. I think making it evented for HTTP is clutching defeat from the jaws of victory. You win very little, because most web servers code is I/O bound.

With 8GB RAM and no virtual memory swapfile, Qbix Server allows you to handle, say, 1600 concurrent HTTP requests and 40,000 websocket connections simultaneously, so having an HTTP handler PHP process exit and be respawned via fork is cheap (0.5ms to reset it to a state with all the bootstrap already done). Processes simply yield when doing I/O and you let the OS handle the I/O waiting instead of green threads in an event loop. It’s almost as fast, and frankly, dynamic PHP can be 2% or less of all your requests, when you start aggressively sending Cache-Control headers causing this Qbix webserver to cache your PHP results, as well as nginx/varnish and CDNs upstream too.


Replies

ahofmanntoday at 3:26 PM

You (well your LLM of choice) doesn't answer the asked question. Maybe I'm stupid and there is an answer in this text, but I can't see it.

show 1 reply