Live data from Hacker News

Nginx Unit – Universal web app server

github.com

81–90 of 201 posts

Re: Nginx Unit – Universal web app server

#81
post #51
post #43

Earlier quoted context omitted.

Eric S. Raymond, in his guide "The Art of Unix Programming", mentions this principle as Rule of Silence: "When a program has nothing surprising to say, it should say nothing." His statement probably related to command line applications, but it makes sense for a lot of cases.

It sounds smart but what counts as surprising is entirely context dependent and most programs won't be aware of your context. E.g. a command line app where you put a subtly wrong switch in that does exactly what it thought you wanted and prints nothing while outputting a 0 exit code is dangerous.

It's about context, of course, but it's not really the program's responsibility to know the user's context. It's the user's responsibility to understand their own context.

A tool should have sufficient interlocks to ensure safety when not engaged, but no more.

Re: Nginx Unit – Universal web app server

#83
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...

Re: Nginx Unit – Universal web app server

#84

Tested this with a moderately complex PHP Laravel app and got a 40% speed improvement. Very useful to be able to run multiple apps each using different lang runtimes/versions without needing separate docker containers.

How does this speed improvement compare to Laravel octane with swoole? Curious if I can switch!

We tried roadrunner (similar thing), but couldn't do it without rewriting certain bits of the app (anything with globals basically) whereas unit was a straight swap. My guess would be, if you're properly using the advantages swoole can bring (like shared memory cache etc), it will outperform unit.

Re: Nginx Unit – Universal web app server

#87
post #58
post #45

Earlier quoted context omitted.

JSON without comments is hell, forcing one to 1) convert JSON configuration to YAML. 2) add comments to YAML and admire it. 3) convert YAML to JSON for sending to the server.

YAML is an order of magnitude more hell...

I literally cannot count the number of times significant whitespace has broken a yaml file I've edited followed by a completely useless error on line 1. I don't have this problem in python. I loath yaml.

Re: Nginx Unit – Universal web app server

#88
post #76

This seems a lot more like how IIS works, unless I'm missing something? As an aside: it's always curious to see how the programming world has splintered into cliques that no longer hang out together. NGINX Unit is a "Universal" web server without support for C++, Rust, or ASP.NET! But PERL is supported, like the 1990s Linux cgi-bin world never went away.

And Go apps require recompiling them to use their version of the http. ListenAndServe function. I’m not sure if this counts either… https://unit.nginx.org/configuration/#updating-go-apps

And requires you to enable CGO, which I avoid at all costs if I can

Re: Nginx Unit – Universal web app server

#89
post #56

This seems a lot more like how IIS works, unless I'm missing something? As an aside: it's always curious to see how the programming world has splintered into cliques that no longer hang out together. NGINX Unit is a "Universal" web server without support for C++, Rust, or ASP.NET! But PERL is supported, like the 1990s Linux cgi-bin world never went away.

In Linux where this is primarily expected to be used ASP.NET is extremely rare, as is C++ for web stuff, and Rust has a vanishingly small web presence still. Lots of people use Perl still though, if not for anything else, for legacy stuff. So might as well ask why it doesn't support Delphi.

Do you have data for your asp.net Linux claim? Feels anachronistic.

Re: Nginx Unit – Universal web app server

#90
Why 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?
Post reply on HN