On Sat, 14 Nov 2026 19:42:33 -0500, Arne Vajhøj wrote:
> On 11/14/2026 5:48 PM, Lawrence D’Oliveiro wrote:
>> >> What I might also have is separate systemd .service files, one for >> running each application,
> > Similar to what the modern PHP servers does. > > It wastes memory, but provides flexibility.
It’s the only rational way to do it. PHP servers like PHP-FPM, of course, just transplant the original mod_php environment into an isolated process, unchanged. And they use creaky old protocols like FastCGI to communicate back to the web server. (Heard of anything else that uses FastCGI? I haven’t.) The approach used by other languages, like NodeJS and Python, is to have your app run its own mini-HTTP server, which is “reverse” proxied through a “real” web server (Apache, Nginx etc) to the outside world. The latter takes care of the tricky stuff like SSL/TLS and virtual hosting, and of course helping to keep the bad guys out, while your app gets its own event loop, its own ability to run background tasks according to its own triggers, and the ability to handle asynchronous requests and maintain long-running connections like WebSockets.