Very slow with socket.io?
Problem
I currently have this set up: port 80: note-http-proxy port 3000: rails port 8888: nodejs server (connection made via socket.io) I have the following in my node-http-proxy: [code block] basically any socket.io connection will be forced to port 8888. When I run this on firefox, I am noticing the following error: When I run this on chrome, I am seeing about a 10 second delay before socket.io can make its first communication. Please look at the screen shot at http://i.imgur.com/Y0rHk.png
Error Output
error: When I run this on chrome, I am seeing about a 10 second delay before socket.io can make its first communication.
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Very slow with socket.io?
So I did a little hacking and I found something: I ditched node-http-proxy and switched over to nginx with the following setup: nginx.conf: [code block] To my surprise, I am seeing the same delay! Actually, this wasn't a delay because no connection could be made. I realized that the delay was caused by socket.io degrading to "lower" levels of communication. As far as I know, node-http-pro
Trust Score
1 verification
- 1
So I did a little hacking and I found something:
So I did a little hacking and I found something:
textserver { listen 80; server_name www.mysite.com; root /Users/vicngtor/mysite/rails/public; passenger_enabled on; location /socket.io { proxy_pass http://localhost:8888; } } - 2
I ditched node-http-proxy and switched over to nginx with the following setup:
I ditched node-http-proxy and switched over to nginx with the following setup:
- 3
To my surprise, I am seeing the same delay! Actually, this wasn't a delay becaus
To my surprise, I am seeing the same delay! Actually, this wasn't a delay because no connection could be made.
- 4
I realized that the delay was caused by socket.io degrading to "lower" levels of
I realized that the delay was caused by socket.io degrading to "lower" levels of communication.
Validation
Resolved in http-party/node-http-proxy GitHub issue #211. Community reactions: 0 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep