Ryan Dahl recommends using Node.JS behind a reverse proxy (i.e nginx). Well.. what is reverse proxy? Any why should I use it with node.js? Is it wrong that my Node.JS app will serve all the content and all the traffic?
Thanks in advance.
what is reverse proxy?
Try to look at wiki article.
why should I use it with node.js?
If you are using node.js only for a certain parts/functionality of your application and other stuff is served by different web application framework for example, then reverse proxy can be used to determine which requests go to node.js and which go to the other framework. This way your application can run on the same port and act to clients as a standalone system. Without it you will probably have to server incoming requests separately for node.js and other framework on different ports (if they are both on the same machine for example). There are also other use cases of reverse proxies, like load balancing.
Is it wrong that my Node.JS app will serve all the content and all the traffic?
No, it's not wrong. It's specific to you and your needs or scenario.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With