Good read, but despite being a major proponent of Node.js and many of the ideals it seeks to embrace, I'm not sure I'm comfortable with calling Apache "archaic". It's not like IE6, which has objectively no redeeming value as a modern platform target -- it did back in the day for sure, and is still relevant in some spheres, but overall I don't think anyone (even Microsoft) would argue that IE6 is "archaic". But to cal…
Precisely , I've used Apache for yeeeeeears and see exactly 0 ROI in switching to something else.
Optimizing Nginx, Node.js and networking for heavy workloads
21–26 of 26 posts
Re: Optimizing Nginx, Node.js and networking for heavy workloads
#22should nginx be only used for serving static files. Does it have any advantage when used to serve plain data API. I want to expose REST api (django + uwsgi) over web, but not sure if should use nginx for it.
Re: Optimizing Nginx, Node.js and networking for heavy workloads
#23Earlier quoted context omitted.
Precisely , I've used Apache for yeeeeeears and see exactly 0 ROI in switching to something else.
An apache expert would probably prove me wrong, but I've found it quite simpler to use nginx to dispatch multiple domains to different backend types. For instance, I have a couple nodes, one wordpress blog and lots of small django websites.
The main strength of Apache though is the ability to separate apps run on the same system by different users without reverse proxy via .htaccess files and stuff like mod_php.
Apache also has an excellent security track record considering it's vast numbers of deployments and years of service.
Perhaps though if you are a green field developer with no Apache experience and deploy with stuff like EC2 you may as well just skip apache and go straight to nginx.
What nginx's security record will look like in 10 years if it becomes as popular as Apache though remains to be seen.
Re: Optimizing Nginx, Node.js and networking for heavy workloads
#24should nginx be only used for serving static files. Does it have any advantage when used to serve plain data API. I want to expose REST api (django + uwsgi) over web, but not sure if should use nginx for it.
Re: Optimizing Nginx, Node.js and networking for heavy workloads
#25Earlier quoted context omitted.
Could you provide some details (or a link)?
When tcp_tw_reuse is enabled the kernel can decide to use the sockets in TIME_WAIT, before they expire or they are closed by the clients. This is a problem though, because the connection could still be used by the client and therefore there could be some collisions regarding the TCP sequence numbers, specially on high traffic servers. The kernel can try to avoid this collision with a technique called PAWS (protection…
Re: Optimizing Nginx, Node.js and networking for heavy workloads
#26should nginx be only used for serving static files. Does it have any advantage when used to serve plain data API. I want to expose REST api (django + uwsgi) over web, but not sure if should use nginx for it.
I think this basically boils down to: "are you likely to have many users connected concurrently at any one time" If your API basically involves a client connecting, quickly getting a small JSON/XML response and then disconnecting again you are probably absolutely fine with Apache unless you have truly enormous numbers of users. OTOH if the socket is likely to be held open for a while, because maybe the API responses…