5 ms·
Isn't it considered best practice to serve your static files through Nginx itself and only reverse proxy requests for dynamic endpoints? And if that's the case,
by toni 12y ago
Isn't it considered best practice to serve your static files through Nginx itself and only reverse proxy requests for dynamic endpoints? And if that's the case, Shouldn't Nginx be counted as a full web server?
- riquito 12y agoYou can configure Nginx to cache and serve html or as a load balancer. In these cases it isn't the "real" web server, and it's common.
- feld 12y agoI disagree. I don't care if nginx is in front of apache, varnish, or some ruby or python web server. If nginx is what serves the final request to the client, it's the webserver. Period. edit: nginx is the last mile. You can't say everyone in the USA has access to fiber because further upstream their traffic traverses a fiber network. Their last mile is DSL/Cable/etc. When it comes to the user experience, last mile is all that counts.
- noselasd 12y agoSure. But it doesn't make sense to not count the other web servers involved. (Even though that's often not possible)
- cma 12y agoBy that logic (I'm not saying the conclusion is wrong), no one has fiber because we always end up translating it to electrical pulses before hitting the cpu, and chrome is the largest webserver because it always checks its own cache before going out to the network.
- vegardx 12y agoIf you start calling things like varnish a web server you'll confuse a lot of people. You generally call them according to what role they serve in your stack, and for Varnish and at times Nginx, that is a reverse caching proxy.
- inli3u 12y agoDepends, but from an application and development perspective, which I'm sure most are assuming here, no. If you can remove nginx and still serve your site/application, then nginx is not your web server. If nginx is acting as a reverse proxy or a cache, then that is all it is.
- Aardwolf 12y agoBy that logic, the webserver would be the last thing in front of the user, their router, their ISP, whatever...
- fla 12y agoI dont agree. Their router processes data below the application layer. Thus why not define the webserver as the last server to serve at the http layer ?