Earlier quoted context omitted.
I thought it was because there's a lot about http that's overhead and/or tough to get right, which can then be delegated to the server. Also, websockets actually map pretty badly to http, conceptually, and fit zeromq much better IMO.
Regarding websockets (admittedly off-topic re Mongrel though), I recently found out about Pushpin[0], which seems to be an elegant way to translate WS into HTTP, should it be of interest to someone. Basically a proxy-server that takes care of accepting either websockets or HTTP on the front, and talking only HTTP on the other side. [0] http://pushpin.org
Nginx Unit
181–190 of 236 posts
Re: Nginx Unit
#182Earlier quoted context omitted.
Pushing back on this a bit...for example, securely exposing a JSON endpoint to the public internet requires extra machinery that applications like nginx bring for free. If you simply set the router to your handler, then you accept arbitrarily large request sizes, wide open for DoS attacks. You have to either manually add limits or pull in some library. nginx caps these by default. Want throttling or load balancing? A…
I would argue that all is part of security-aware software engineering. If you aren't thinking of these things you have no business writing publicly-exposed HTTP applications.
Re: Nginx Unit
#183It's worth noting that it'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/Python/Ruby/etc.
Re: Nginx Unit
#184> It is not recommended to expose unsecure Unit API why do people always use "not recommended" when they actually mean "do not ever do this or you'll end up the laughing stock in the tech press" 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. It's very cool that by design it's only listening on a dom…
For the same reason they say, "non-trivial" when they really mean "nearly impossibly difficult". :)
Re: Nginx Unit
#185Earlier quoted context omitted.
I would argue that all is part of security-aware software engineering. If you aren't thinking of these things you have no business writing publicly-exposed HTTP applications.
What if I have an application that needs to be deployed internally and externally in separate instances. Identical application, but different security contexts. Using Nginx to handle these concerns is easy.
Re: Nginx Unit
#186Earlier quoted context omitted.
Because people have a hard time figuring out what it is. Could you explain what it is? What benefits does it have to make it worth exploring? To me it looks like a rather invasive but flexible and dynamically configurable inetd. But it forces you to use its own libraries to receive http requests.
It's a lot like OpenResty ( https://openresty.org/en/ ), which is Nginx with a Lua interpreter embedded and bridged to its request-response cycle (the OpenResty page explains the point of that pretty well); but instead of Lua, Unit has a bunch of other language runtimes embedded.
Re: Nginx Unit
#187Earlier quoted context omitted.
Minor quibble, in the context of serving static files (ie. from disk), go doesn't use async I/O, the file I/O blocks the thread until it's complete. But since go's scheduler is M:N this doesn't lock up the whole program, so your point stands.
I would be surprised if go did not use the 'sendfile' syscall that does exactly this, is there a go nut that can clarify?
Re: Nginx Unit
#188Earlier quoted context omitted.
When I started with apache, I thought it was great, but after moving to nginx, the speed and simplicity made me never look back. While these new features to nginx aren't new to the world, they are a nice welcome addition to a system that IMO is far superior to apache.
I never found Nginx especially simple to setup, the config files were always messy. Caddy seems to have knocked this out of the park for me, especially considering automated https, and redirection.
How? It so much cleaner and simpler than Apache. I don't get this sentiment.
Re: Nginx Unit
#189Earlier quoted context omitted.
Pushpin uses Mongrel2 under the hood to handle incoming WebSocket connections, so not entirely off topic. :) It's pulled in as a dependency and launched in the background.
I thought PushPin was based on Qt?
Re: Nginx Unit
#190Earlier quoted context omitted.
NGINX allows you to proxy a back-end applications giving you the ability to load balance, handle upstream failures with custom maintenance pages, employ server blocks (virtual hosts), and much more. However, you always need to do the leg work to get your specific application language up and running. This new unit system makes that job easier as you would no longer need to employ separate middleware, like PHP-FPM for…
I'm sorry but I'm not sure I get it. Is it like the apache mod_php for php for example ? Thanks in advance for your answer
You can see the PHP configuration here:
http://unit.nginx.org/docs-configuration.html#php-applicatio...
And here's the configuration needed to integrate Unit with NGINX: