Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Do I really need proxy for handling node.js?

Do I really need proxy for handling node.js?

Problem

I'm going to use Socket.IO to handle websockets or XHR-polling to implement a realtime app

which is on the top of node.js.

Many people are so into proxying their node.js server and

I don't understand the true meaning of proxy except security reasons.

Is there other reason to set proxy to handle node?

I'm currently using nginx 1.1 as a webserver and proxy server.

Unfortunately, I have found that nginx 1.1 can support HTTP 1.1 but not websockets.

Should I just use Socket.IO without proxying?

Or If I really need to do it so, how can I set up proxying websockets with nginx or other alternatives?

Problem courtesy of: InspiredJW

Solution

You may have noticed that you can only run one server on any given TCP port. If you want to use node.js and any other web server, then you'll want to have a proxy server to send client requests to the correct backend server.

Solution courtesy of: Greg Hewgill

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

Do I really need proxy for handling node.js?

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×