5 ms·
Web sockets are great, but almost all of the demos I see use a separate port (i.e. not port 80), making the app useless in practice. Come on guys - it's _Web_
by aslakhellesoy 16y ago
Web sockets are great, but almost all of the demos I see use a separate port (i.e. not port 80), making the app useless in practice.
Come on guys - it's _Web_ sockets, not intranet sockets.
- lftl 16y agoCould you elaborate on why a nonstandard port makes these apps useless?
- user24 16y agocorporate firewalls blocking nonstandard ports, you running other apps on those ports, your firewall throwing a wobbly, general nonstandardness. if 80 is impractical, many people suggest running off 443 as that (the https port) is unlikely to be filtered.
- aslakhellesoy 16y agoIt's not hard to serve both regular http requests and web socket requests on the port 80 on the same host. Just use a special context path for web socket requests, for example /websocket/* Some of the node.js websocket impls let you do this easily while others don't. Don't use the ones that require a separate port. Nobody behind a corporate firewall will be able to use your app if you do.
- lenary 16y agoI think it is possible to have a ws server listening on the same port (and even path) as an http server, hence it shouldn't really matter. And if you really care, you could make a http forwarding proxy with node to forward normal http requests through to your app if it's written in something else, but deal with websockets itself.
- maushu 16y agoThe problem here is that to bind the websocket to the port 80 they would need to code their whole sites in node.js (with no reverse proxying from nginx and the likes) or at least make a reverse proxy in node.js and use it as front-end.