Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Nov 07, 2011 1:54 pm 
Offline
Senior Member

Joined: Wed Jul 21, 2010 8:04 pm
Posts: 119
Hi All,
Random question -- has anyone ever had any problems serving files on a non-standard port, like port 8080? Have you found that any ISPs/mobile carriers block requests from their customers when they use a non-standard port? I'm trying to troubleshoot some rather weird problems with a web app that uses Apache on port 80 and Node.js/Socket.IO on port 8080.

Thanks,
Jeff


Top
   
PostPosted: Mon Nov 07, 2011 2:41 pm 
Offline
Senior Member

Joined: Fri Feb 18, 2005 4:09 pm
Posts: 594
jzimmerlin wrote:
Have you found that any ISPs/mobile carriers block requests from their customers when they use a non-standard port?


Many companies block outgoing ports other than 80 and 443. So for example, I cannot hit http://[any domain]:8080 from the office at my day job.

James


Top
   
 Post subject:
PostPosted: Mon Nov 07, 2011 3:00 pm 
Offline
Senior Member

Joined: Sun May 23, 2010 1:57 pm
Posts: 315
Website: http://www.jebblue.net
You could Apache's ProxyPass and ProxyPassReverse combination to direct traffic to your port 8080 server. Or are you saying you're doing that and running into issues?


Top
   
PostPosted: Mon Nov 07, 2011 3:07 pm 
Offline
Senior Member

Joined: Wed Jul 21, 2010 8:04 pm
Posts: 119
jebblue wrote:
You could Apache's ProxyPass and ProxyPassReverse combination to direct traffic to your port 8080 server. Or are you saying you're doing that and running into issues?


No, the Apache server and the Node.js/Socket.IO server are completely separate. I'm not proxying or anything like that.

zunzun wrote:
Many companies block outgoing ports other than 80 and 443. So for example, I cannot hit http://[any domain]:8080 from the office at my day job.


If that were the case, what would my options be? I suppose I could get another Linode to host the Node.js/Socket.IO server on, on port 80. Alternatively, would it be possible to get a second IP and host the Node.js/Socket.IO server on that IP on port 80? Any other solutions I haven't thought of?

Thanks for all of your help!


Top
   
PostPosted: Mon Nov 07, 2011 4:27 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
jzimmerlin wrote:
If that were the case, what would my options be? I suppose I could get another Linode to host the Node.js/Socket.IO server on, on port 80. Alternatively, would it be possible to get a second IP and host the Node.js/Socket.IO server on that IP on port 80? Any other solutions I haven't thought of?

Or just differentiate the different services based on hostname or URL. Whatever one then listens on port 80 (say Apache) proxies URLs for the other internally.

If the Apache overhead is too much for proxying, something like nginx (which could front both Apache and Node.js servers) could be placed in front of both.

(Oh, this assumes your Node.js app is still using HTTP for communication - if it's raw traffic, you'd have to invert things so it was probably the main app listening on port 80 and only if it detected HTTP would it proxy over to Apache. Proxying in this case could be done at a raw stream level, as pure socket forwarding. You'll only be stuck if there's no way to distinguish HTTP from the raw protocol.)

-- David


Top
   
PostPosted: Mon Nov 07, 2011 6:05 pm 
Offline
Senior Member

Joined: Wed Jul 21, 2010 8:04 pm
Posts: 119
db3l wrote:
jzimmerlin wrote:
If that were the case, what would my options be? I suppose I could get another Linode to host the Node.js/Socket.IO server on, on port 80. Alternatively, would it be possible to get a second IP and host the Node.js/Socket.IO server on that IP on port 80? Any other solutions I haven't thought of?

Or just differentiate the different services based on hostname or URL. Whatever one then listens on port 80 (say Apache) proxies URLs for the other internally.

If the Apache overhead is too much for proxying, something like nginx (which could front both Apache and Node.js servers) could be placed in front of both.

(Oh, this assumes your Node.js app is still using HTTP for communication - if it's raw traffic, you'd have to invert things so it was probably the main app listening on port 80 and only if it detected HTTP would it proxy over to Apache. Proxying in this case could be done at a raw stream level, as pure socket forwarding. You'll only be stuck if there's no way to distinguish HTTP from the raw protocol.)

-- David


I'll mess around with that. Thanks!


Top
   
PostPosted: Mon Nov 07, 2011 8:35 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
jzimmerlin wrote:
Alternatively, would it be possible to get a second IP and host the Node.js/Socket.IO server on that IP on port 80?


If you're using IPv6, you have a large number of IP addresses available. Not the case with IPv4 any more, alas. (And IPv6 support is probably spottier than non-standard port support.)

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Thu Nov 17, 2011 4:54 pm 
Offline
Senior Newbie

Joined: Sun Aug 22, 2010 12:57 pm
Posts: 19
It's worth noting that while nginx rocks, it does not support HTTP/1.1 to backend proxied servers. This would make WebSockets not possible, and thus eliminate one of the best features of socket.io. I would recommend using Apache in this case, because it fully supports HTTP/1.1 to both the client and to backend proxied servers (like your socket.io process)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group