TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Nginx Unit

680 pointsby tomdover 7 years ago

45 comments

Waterluvianover 7 years ago
I hate sites like this. Im probably stupid but I have no idea what precisely it is after reading that page. I just know that marketing team wants me to believe it's going to be my saviour.
评论 #15204124 未加载
评论 #15200063 未加载
评论 #15197544 未加载
评论 #15200090 未加载
评论 #15196747 未加载
skrebbelover 7 years ago
This looks pretty cool, and makes me sad that Mongrel2 never became popular. In short: Mongrel2 solves the same problem, but does it by letting your application handle requests and websocket connections over ZeroMQ instead of eg FastCGI.<p>I guess it lost momentum when ZeroMQ did. Anyone know why? Sounds like a dream solution in the current microservice hype.<p><a href="http:&#x2F;&#x2F;mongrel2.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;mongrel2.org&#x2F;</a>
评论 #15191275 未加载
评论 #15190275 未加载
评论 #15190602 未加载
评论 #15190397 未加载
评论 #15191006 未加载
mmahemoffover 7 years ago
Confusing description. After seeing the Github README (<a href="https:&#x2F;&#x2F;github.com&#x2F;nginx&#x2F;unit#integration-with-nginx" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;nginx&#x2F;unit#integration-with-nginx</a>), it looks to be Nginx&#x27;s alternative to low-level, language-specific, app servers, e.g. PHP-FPM or Rack, with the benefit that a single Unit process can support multiple languages via its dynamic module architecture, similar to Nginx web server&#x27;s dynamic modules.<p>It&#x27;s still intended to run behind Nginx web server (or some other web server), much like you&#x27;d run something like PHP-FPM behind a web server.
评论 #15190471 未加载
评论 #15191030 未加载
pilifover 7 years ago
<i>&gt; It is not recommended to expose unsecure Unit API</i><p>why do people always use &quot;not recommended&quot; when they actually mean &quot;do not ever do this or you&#x27;ll end up the laughing stock in the tech press&quot;<p>Exposing this otherwise awesome API to the public will amount to a free RCE for everybody. So not ever expose this to the public, not even behind some authentication.<p>It&#x27;s very cool that by design it&#x27;s only listening on a domain socket. Don&#x27;t add a proxy in front of this.
评论 #15195104 未加载
评论 #15192802 未加载
评论 #15192430 未加载
jimjagover 7 years ago
I am biased, but call me underwhelmed. It seems that with every &quot;new&quot; feature, nginx is copying Apache httpd, even now claiming to be the &quot;swiss army knife&quot; of web-servers. Embedded languages. Dynamic modules. Support of uWSGI. gracefull restarts. Thread pools... and yet people eat it up. Just goes to show what having corporate-backed marketing and PR can do.
评论 #15192420 未加载
评论 #15192417 未加载
评论 #15192818 未加载
评论 #15193253 未加载
phillippschmedtover 7 years ago
Could anyone explain to me why I would want to use this? What exactly is the use case and benefits of it when I am for example running a go web application?
评论 #15191181 未加载
bkeroackover 7 years ago
It&#x27;s worth noting that it&#x27;s rarely necessary or desirable to put an app server like nginx in front of Go HTTP server applications. The Go standard library http and TLS stack are production quality and rock solid. Putting something in front is mostly cargo culting from people more used to the worlds of PHP&#x2F;Python&#x2F;Ruby&#x2F;etc.
评论 #15193136 未加载
评论 #15195711 未加载
评论 #15192820 未加载
评论 #15192648 未加载
评论 #15195067 未加载
评论 #15192678 未加载
评论 #15194191 未加载
评论 #15192488 未加载
jchwover 7 years ago
Sounds like uWSGI based on the description. I wonder how it&#x27;ll play along with certain environments like Kubernetes.
评论 #15190832 未加载
评论 #15192577 未加载
评论 #15203194 未加载
oelmekkiover 7 years ago
I initially thought it would allow to dynamically handle upstreams list (and other configuration) like hipache is doing [1], which would be awesome for dokku or other container management systems which rely on system nginx. But after seeing languages mentioned, I&#x27;m confused.<p>Is it supposed to replace language specific servers, like unicorn and puma for rails (but then, I&#x27;m confused about what such kind of support would be for Go, since the server is directly embedded in the program)? Does it embeds interpreter for interpreted languages, like mod_* did for apache?<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;hipache&#x2F;hipache" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;hipache&#x2F;hipache</a>
评论 #15193690 未加载
评论 #15192994 未加载
评论 #15191890 未加载
评论 #15190593 未加载
chatmastaover 7 years ago
I&#x27;m having a hard time seeing what niche this fills. It seems to be both a process manager and TCP proxy. What am I missing here? What makes this better than, for example, using docker-compose?<p>I think a &quot;how it works&quot; or &quot;design doc&quot; would be really helpful.<p>That said, the source files do make for pleasant reading. The nginx team has always set a strong example for what good C programming looks like.<p>EDIT: Their blog post [0] makes this more clear... nginx unit is one of four parts in their new &quot;nginx application platform&quot; [1]<p>[0] <a href="https:&#x2F;&#x2F;www.nginx.com&#x2F;blog&#x2F;introducing-nginx-application-platform&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.nginx.com&#x2F;blog&#x2F;introducing-nginx-application-pla...</a><p>[1] <a href="https:&#x2F;&#x2F;www.nginx.com&#x2F;products&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.nginx.com&#x2F;products&#x2F;</a>
评论 #15190284 未加载
bovermyerover 7 years ago
More useful: <a href="http:&#x2F;&#x2F;unit.nginx.org&#x2F;docs-nginx-unit.html" rel="nofollow">http:&#x2F;&#x2F;unit.nginx.org&#x2F;docs-nginx-unit.html</a>
pkstnover 7 years ago
What is this? I&#x27;ve tried to read blog post, product site, these comments and still having really hard time figuring out what is Unit and why?
评论 #15194650 未加载
jonotimeover 7 years ago
Interesting. I like the restartless configs idea. This is becoming more common these days with short lived microservices. This week I just switched my load balancer setup from HAProxy to Traefik - very nice API based setup. <a href="https:&#x2F;&#x2F;traefik.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;traefik.io&#x2F;</a>
amouatover 7 years ago
Also note github repo at <a href="https:&#x2F;&#x2F;github.com&#x2F;nginx&#x2F;unit" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;nginx&#x2F;unit</a>
评论 #15190143 未加载
bluetechover 7 years ago
I&#x27;m happy to see this. nginx itself is excellent software, I&#x27;ll be happy to use similar tech for the application server as well (instead of uwsgi).<p>There are a couple of options I&#x27;d like to see added to the Python configuration though before I could try it:<p>- Ability to point it at a virtualenv.<p>- Ability to set environment variables for the application.
评论 #15190482 未加载
wiradikusumaover 7 years ago
The logo makes it as if it&#x27;s read &quot;N Unit&quot;, which is probably confusing as a popular unit testing with such name exists: <a href="http:&#x2F;&#x2F;nunit.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;nunit.org&#x2F;</a>
metalliqazover 7 years ago
So in my Flask app this would replace gunicorn?
评论 #15191525 未加载
svennekover 7 years ago
So it looks like they basically rewrote uwsgi and slapped a rest api on top of it.. (as a big fan of uwsgi, that seems like a reasonable thing to do...)
评论 #15190179 未加载
评论 #15191550 未加载
agentgtover 7 years ago
I&#x27;m still not sure I understand &quot;Unit&quot;.<p>I can&#x27;t speak for the other languages (PHP, Go, Python) but I have some reservations about it helping Java (as well as Erlang and other (J)VM languages) as FastCGI like stuff has been attempted for Java in the past with not very good success with the exception of Resin.<p>I guess it would be interesting though if they did a native Servlet 3.0+ implementation like Resin but I doubt that is is what will happen. Regardless Netty, Undertow and even Jetty have caught up speed wise to Resin (well at least according to techempower).
评论 #15192353 未加载
baybal2over 7 years ago
Looks to be a good candidate to replace omnipresent nginx based API routers
评论 #15190124 未加载
ultimooover 7 years ago
For Go, does anyone have opinions on how is this is advantageous than using the in-built HTTP server (net.Listen() from net&#x2F;http) that can fronted by a regular nginx&#x2F;proxy_pass?
footaover 7 years ago
This would take the place of something like tomcat or uwsgi, right?
评论 #15190964 未加载
评论 #15190072 未加载
yeukhonover 7 years ago
It is in beta, but I hope this won&#x27;t become a commerical-only product.
评论 #15190246 未加载
ishtuover 7 years ago
I am surprised noone mentioned Kong [1] yet. It seems to implement most of stuff promised by Unit and it was around for a few years.<p>[1] <a href="https:&#x2F;&#x2F;getkong.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;getkong.org&#x2F;</a>
评论 #15191983 未加载
评论 #15191876 未加载
noway421over 7 years ago
Any use for that on small scale (of 1 instance)? If you&#x27;d need to run nginx in front of it anyway, does it provide any use in case where you&#x27;d normally use php-fpm and some proxy_pass?
评论 #15191140 未加载
reificatorover 7 years ago
The concept of XUnit is so ingrained in my head that I assumed it was a unit testing framework for NGINX.<p>The rest of the headline cleared it up of course, but I was curious for a minute how that would look.<p>EDIT: When discussing a new product, I would think the name is a fair point of discussion.<p>Furthermore after this thread&#x27;s title changed, it now requires a clickthrough to dispel similar misunderstandings.
评论 #15190745 未加载
taf2over 7 years ago
Is this similar to openresty ? Instead of Lua - python, go and php? Or something different?
评论 #15191535 未加载
atemerevover 7 years ago
So, Nginx follows exactly the way of Apache HTTP: remember mod_php, mod_perl etc?
评论 #15190613 未加载
mattacularover 7 years ago
I didn&#x27;t see this mentioned but is there any way to upgrade the versions of the modules such as Go and PHP indepedendently of the core Unit package?
AsyncAwaitover 7 years ago
So is still standalone or do you still need to run this behind the regular Nginx, like you would a language-specific application server?
lngnmnover 7 years ago
Oh, they wrote their own uwsgi, based on what presumably started as nginx2. That&#x27;s cool.<p>I hope they would avoid the Second System syndrome..
eeZah7Uxover 7 years ago
[honest question, not being negative] what real use-case is not already being addressed by existing technologies?
评论 #15190295 未加载
评论 #15190299 未加载
dogweatherover 7 years ago
&gt; Run multiple applications written in different languages on the same server<p>Amazing progress! Someone introduce them to CGI.
devjover 7 years ago
How is it different from Envoy?
评论 #15191150 未加载
评论 #15191116 未加载
评论 #15196881 未加载
LeicaLatteover 7 years ago
Looks fantastic! Will be trying this over the weekend.
scadgeover 7 years ago
Is it an alternative to Docker Compose in some sense?
Antwanover 7 years ago
Any report of the perf (VS uWSGI for example) ?
neo_blackcapover 7 years ago
So does it use fastcgi to rule them all?
moklickover 7 years ago
Nginx Unit &gt; G Unit
mempkoover 7 years ago
But can I use Perl 6?
评论 #15199220 未加载
hathymover 7 years ago
how does it compare to openresty&#x2F;luajit ?
评论 #15191037 未加载
marktam264over 7 years ago
Is this like AWS Lambda you could put in your own cloud?
评论 #15191005 未加载
评论 #15190528 未加载
argsnoover 7 years ago
So, it&#x27;s an application server?
fgjjgutjvnuover 7 years ago
I recently tried to deploy a python flask application, and it was quite a mess. It relied on some services I had never heard of, and the documentation was a mess (not the documentation of Flask but of how to deploy it properly).<p>If Nginx Unit could host flask applications, it would be great news.
smegelover 7 years ago
&gt; Full support for Go, PHP, and Python;<p>Does it do WSGI then? Did they write the equivalent of mod_wsgi?
评论 #15192033 未加载