开发者

What is Reverse Proxy and why should I use it with Node.JS?

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 m开发者_JAVA技巧y 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.


http://en.wikipedia.org/wiki/Reverse_proxy - reverse proxy servers will lower the load on your application server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜