Hacker News new | ask | show | jobs
NGINX Unit 1.0 is available and production-ready (nginx.com)
32 points by darksoul 2992 days ago
6 comments

I'm struggling to understand the purpose of this, or why I would choose this over php-fpm. It seems to be competing with Docker as it isolates applications with cgroups, but if I'm already running docker, what's the point? Perhaps another layer of isolation? ¯\_(ツ)_/¯
I still don't understand what Unit is.

Is it more like Nginx or like Traefik?

Is it more a replacement for fastcgi or for php-fpm?

It looks like this is a replacement for uwsgi[1] -- which has a ton of features on it's own, and plugins for these languages and more ...

[1] https://uwsgi-docs.readthedocs.io/en/latest/

here is a usecase with WordPress installation

[1] https://www.nginx.com/blog/installing-wordpress-with-nginx-u...

"As of Release 1.0, NGINX Unit supports Go, Perl, PHP, Python, and Ruby on the same server. Multiple language versions are also supported, so you can, for instance, run applications written for PHP 5 and PHP 7 on the same server."

Proceeds to give no examples for setting up PHP 5 and PHP 7 on the same server, anywhere on their site

I wondered about that too and found the solution on Github: https://github.com/nginx/unit/issues/46
That's further than I got. Mostly my issue is that, if we're now getting into needing to compile nginx unit from source and manually compiling the PHP modules, it doesn't save anything over setting up php with CGI or WSGI. I'm not afraid of compiling software, but I am afraid of regular update maintenance of compiled software, so I try to only use packaged released whenever possible. I would rather slightly harder initial configuration than manual compilation.
I’m guessing this is meant for microservices and containers?

Edit: It is. I can’t figure out if it is completely new or of it shares code with Nginx “Classic”.

And another edit: They don’t seem to have support for dotnet core planned. Interesting.

From what I can gather, nginx still sits in front of Unit and proxies requests to it
Will be interesting to see how Java runs on this. Currently Spring boot is sucking up all oxygen in Java microservices space which is basically tomcat inside Spring container instead Spring in Tomcat container.
Seems like the most benefit of it is together with NGINX+ which costs minimum 2500$/year/instance.
why do you think that?
If you want to scale it, It would be more expensive not to choose the already integrated route (NGINX+) rather than building your own (API GW, LoadBalancer) wouldn't it?