FG
📡 Networking

Very slow with socket.io?

Freshalmost 14 years ago
Mar 14, 20260 views
Confidence Score87%
87%

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

Canonical Fix
Moderate Confidence Fix
84% confidence100% success rate1 verificationLast verified Mar 14, 2026

Solution: Very slow with socket.io?

Low Risk

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

84

Trust Score

1 verification

100% success
  1. 1

    So I did a little hacking and I found something:

    So I did a little hacking and I found something:

    text
    server {
        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. 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. 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. 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

Worked: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

proxyhttpnode.js