Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm currently having a lots of difficulties trying to play with socket.io which needs websockets support from the server (reverse-proxying).

I was wondering, is there any other web servers out there that supports websockets?

The errors I'm having with nginx:

2012/05/22 02:19:34 [error] 28159#0: *5 connect() failed (111: Connection refused) while connecting to upstream, 
client: my.ip.ad.dr,
server: localhost,
request: "GET /socket.io/1/?t=1337653158192 HTTP/1.1", 
upstream: "http://127.0.0.1:3000/socket.io/1/?t=1337653158192", 
host: "lifestore.brainpad.org", referrer: "http://mywebad.dr/"
share|improve this question
2  
Websockets are not currently supported by Nginx (even though v1.2 implements HTTP/1.1) They are on the roadmap for Nginx 1.3. You may have some luck with the tcp-proxy-module or node-http-proxy. Personally, I place Varnish in front of Nginx and have it proxy Websocket requests directly to Node.js (HAProxy should also work). –  cyberx86 May 22 '12 at 4:08
add comment

3 Answers

nginx has support for proxying WebSockets since version 1.3.13.

The only thing I've found so far that could conceivably be called documentation is this commit message.

share|improve this answer
    
nginx.org/en/docs/http/websocket.html –  VBart Feb 28 '13 at 20:26
add comment

You can use node.js it is fully tested and works both client and server side. If you prefer another programming language, there is a nice list of Websocket servers on SO here

share|improve this answer
    
socket.io is a node.js lib for websocket ... –  Guillaume Massé Sep 21 '12 at 4:31
add comment

nginx doesn't natively support websockets. Looks like there is a tcp proxy module that can be compiled into nginx to do this.

http://www.letseehere.com/reverse-proxy-web-sockets

But a few other discussions(here and on SO) seem to indicate that one would go down to node.js directly.

Given that you're using socket.io, I suspect you're already using node.js on the backend. Also, this blog post by the trello team is rather informative. http://blog.fogcreek.com/the-trello-tech-stack/

share|improve this answer
    
Thanks! That post you have is very informative and gave me even more ideas for my project! –  TomShreds May 22 '12 at 11:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.