Join the discussion
Write your take first — we'll ask for email only when you're ready to publish.
- Hacker News
- s/you built/you spent LLM tokens to build/g
The general idea makes sense. PHP, particularly modern Java-style PHP, is notorious for loading sometimes thousands of files for every single request. I think there's opcache enabled by default, so the load on the filesystem is reduced by quite a bit, but even opcache still needs to do some sort of parsing for each request that comes in.
by mschuster91 - People have been using pcntl_fork to speed up PHP code since the 90s. It seems good on paper, can produce an "impressive" demo and falls apart quickly on real world projects and use cases. This is nothing more than LLM slop/psychosis.by dreadnip
- > php-fpm re-bootstraps the framework on every request (10–50ms)
What is the setup/benchmark that caused you to see this?
by nzeid - You don't need your database on a dedicated server. Not sure why the comparison table claims "$30 + DB server" when your web server is a perfectly good server already.by LoganDark
- I'm confused why the copy you generated repeatedly boasts "no nginx, no Redis" as if those things don't exist independently of application servers for a reason, and as if building something that doesn't need these things (when deployed as a single instance) is particularly notable.
"no Docker" - so what? Docker is a tool. Running containers on Linux has extremely low overhead. No idea what this is about.
You didn't spend the effort to decorate the slop with your rationale for these choices, so I see no evidence that you built any of this.
by mpalmer - Sort of unrelated, but I recently built an http server in Odin to learn the language. It’s a pleasant language, and very low memory usage, if managed well. Around 50k requests per second on my old laptop. The surprising thing was that Bun matched it (albeit at 50MB RAM usage vs 3MB for Odin).
It’s a lot of fun working on such things, but the reality is, for most apps, almost any stack is more than fine.
- Outside of the prefork mode (which cannot compete even with just FPM/Apache mod), this has a bunch of isolation issues that I don't see mentioned anywhere; namely statics in functions (often seen as a request-lifetime cache in PHP), typed statics without defaults, define(), $_ENV, setlocale(), ignore_user_abort() or mb_internal_encoding() just to name a few. It also assumes all function/class declarations are guarded, so this isn't a drop-in replacement for a webserver that "just works"; for most code, it probably doesn't, so the "unmodified PHP" claim seems like a stretch.
EDIT: After reading through the fairly long README, this is mentioned. So you either use the provided server API to make it fast, or use the CGI mode - even for WP, Laravel or Symfony ("legacy", really?)). It'd be better advertised as a framework, using which is the only way to actually achieve the promised results.
I'm also a bit confused by the webserver code itself; it's PHP 5 code (with all the @class and @private annotations, even) that targets 8.1 (EOL) and yields deprecation notices on PHP 8.2.
The taken approach is interesting, but I'd not put this in front of anything that matters.
If you're this uncomfortable with having to run a webserver, but comfortable with a vibecoded webserver, consider switching to Go, .NET or any other stack where you don't have to fight the PHP's inherent shared-nothing model.
- > 1060 req/s
Nice! I remember 2010 when a single-core pentium 4 was happily doing 18k RPS with Glassfish. Ten more years of progress and you can match that!
by pshirshov