Nginx Unit + PHP seems to handedly out-perform Nginx + php-fpm[1][2][3]. Also, Docker environments running PHP via Nginx Unit will no longer need separate containers for http + fpm, as it works similar to Apache's mod_php. 1. https://habr.com/en/articles/646397/ 2. https://medium.com/@le_moment_it/nginx-unit-discover-and-ben... 3. https://github.com/nginx/unit/issues/6#issuecomment-38407362...
You don't need separate containers to run nginx and php-fpm.
Nginx Unit – Universal web app server
121–130 of 201 posts
Re: Nginx Unit – Universal web app server
#122Well I commend the Nginx team for trying something new and launching this, even though I'm not sure what I would use it for personally. Slightly tangental, but it always irks me when I see these kinds of responses in JSON: { "success": "Reconfiguration done." } Really this should be something like "result": "success". Using "success" as a key name tells me nothing about the data it's representing.
If I were designing it I’d probably have a result field too, or even a success boolean. But I don’t hate what they’re doing here: the presence of the key is the Boolean value, the value is the description. A two for one.
Re: Nginx Unit – Universal web app server
#123Earlier quoted context omitted.
You don't need separate containers to run nginx and php-fpm.
does it involve running supervisor inside the container? that’s fine but it’s definitely not kosher. in my experience those are the ones that kick and scream when they don’t start as root.
Re: Nginx Unit – Universal web app server
#124Well I commend the Nginx team for trying something new and launching this, even though I'm not sure what I would use it for personally. Slightly tangental, but it always irks me when I see these kinds of responses in JSON: { "success": "Reconfiguration done." } Really this should be something like "result": "success". Using "success" as a key name tells me nothing about the data it's representing.
That's like when I see APIs that give you responses with a 200 code, but then in the message there's a backend error.
Re: Nginx Unit – Universal web app server
#125Re: Nginx Unit – Universal web app server
#126Earlier quoted context omitted.
You don't need separate containers to run nginx and php-fpm.
I too would like to see a properly configured php+php-fpm container benchmark. There's a lot of overhead when you link by http instead of a unix socket, in the same container.
https://github.com/sameersbn/docker-postgresql/issues/30#iss...
Curious about benchmarks and tests of TCP vs Unix domain sockets between docker containers.
Re: Nginx Unit – Universal web app server
#127Nginx Unit + PHP seems to handedly out-perform Nginx + php-fpm[1][2][3]. Also, Docker environments running PHP via Nginx Unit will no longer need separate containers for http + fpm, as it works similar to Apache's mod_php. 1. https://habr.com/en/articles/646397/ 2. https://medium.com/@le_moment_it/nginx-unit-discover-and-ben... 3. https://github.com/nginx/unit/issues/6#issuecomment-38407362...
Those benchmark outcomes are ridiculously in nginx-unit’s favor over php-fpm, way more than I would have believed was possible. What is php-fpm doing architecturally that is so different to warrant such poor relative performance?
Unfortunately said benchmarks are usually done by the software company making said webserver, so have to be taken with a pinch of salt.
1. https://www.litespeedtech.com/open-source/litespeed-sapi/php
Re: Nginx Unit – Universal web app server
#128Earlier quoted context omitted.
> Yes, this is as bad as it looks: “success” isn’t even part of the schema. It’s in the examples, but not the actual schema definition. Having gone through a pretty heavy overhaul of an "OpenAPI" (full code in Elixir at https://github.com/etalab/transport-site/pull/3351 ), I stumbled on that exact type of problem! At the scale of nginx, having automatic verification that the examples (and the output of the API in gen…
I recently found this open source postman typed alternative, hadn't had time to really try it yet but the types stuff should help here no? https://recipeui.com/
Thanks for the link though!
Re: Nginx Unit – Universal web app server
#129Well I commend the Nginx team for trying something new and launching this, even though I'm not sure what I would use it for personally. Slightly tangental, but it always irks me when I see these kinds of responses in JSON: { "success": "Reconfiguration done." } Really this should be something like "result": "success". Using "success" as a key name tells me nothing about the data it's representing.
Re: Nginx Unit – Universal web app server
#130Why the obsession (it seems to be the prominent point in the readme) with configuration via API? How often do you need to add php support on the fly? I want to configure my app server via files so it just starts up in the state that I expect. What am I missing?