DEV Community

Discussion on: Nginx concepts I wish I knew years ago

Collapse
 
andreidascalu profile image
Andrei Dascalu

Well, you are wrong about the definition. A web server doesn't pass a request to a backed server. That's what a proxy does.

A webserver serves content. That's it. It handles the request and returns it's own response, whereas a reverse proxy proxies the response.

Even though the most efficient part of Nginx is its web server capability, it's widely used as a proxy/reverse proxy.

However there are much more capable proxies out there (unless you're using the enterprise version): thinking mainly of Haproxy and Traefik.

Collapse
 
skyjur profile image
Ski • Edited

Bit of hair splitting. Http reverse proxy IS a web server by definition of server as in TCP protocol node that acts as server in client-server connection.

Collapse
 
andreidascalu profile image
Andrei Dascalu

HTTP reverse proxy is a server (as in general term). Web server serves web content (as in WWW, eg: html/js). Sure, it's hair splitting, but the difference can be important in certain contexts. Eg: HAProxy is a reverse proxy, but NOT a web server as it's unable to actually serve content (it can only proxy it).

IMHO it's important to know the tools and what they can do to choose what's right.
A proxy can be, for example, a HTTP proxy or a TCP proxy. Some proxies can do both, some can only do HTTP by design.

Collapse
 
simonholdorf profile image
Simon Holdorf

How about you say something like: thank you for the post and all the work you have put into this. I have slightly other opinions about X and want to share my version...

Yours sounds way too rude!

Collapse
 
andreidascalu profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Andrei Dascalu

You have a point, but I wouldn't want to ruin my reputation as a literal and figurative bastard. And I wouldn't want people to think I discriminate.

Collapse
 
aemiej profile image
Aemie Jariwala • Edited

In the article, I mentioned that the web server passes/directs the requests to the backend server. In the same sense that it's handling the connection between the client and the backend server. However, I agree with your definition as well hence thank you for your opinion! I will certainly look into those proxies as well. 😀