Hacker News new | ask | show | jobs
by hu3 1877 days ago
I wouldn't read too much into that.

nginx is good at serving dynamic content too. Simple setup with uwsgi for Python and php-fpm for PHP.

1 comments

I think both fpm and wsgi would fall under what OP called "proxying to application servers", despite using a different protocol. Yes it's technically "serving", but so is proxying and literally anything else a "server" does. Maybe "hosting" is a better term: both can serve any content, including dynamic, but apache can often host it as well (without an external server), which nginx can't do nearly as well.
No, I'm addressing this point where OP says nginx is only good at serving static content. See "really just good" here:

> Considering nginx is really just good at serving static content...

That's not correct at all. Regardless of how the request handled, serving dynamic content on nginx is trivial.

What about the rest of that sentence? The way I read it (admittedly, the English is broken, so it isn't entirely clear what they meant) was that nginx is only good at "serving" static content, while the rest of what it does is proxying, not "serving". In that case, where a distinction is intentionally made between "serving" and "proxying", taking request for dynamic content and just shooting them off to an application server like uwsgi wouldn't be considered "serving".

Taking this logic to the extreme, socat is also very good at serving dynamic content:

  $ socat TCP-LISTEN:80,fork,reuseaddr TCP:127.0.0.1:8080 # Make sure Gunicorn is running on port 8080 to handle incoming requests