1

I use nginx in this mode for BOSH and chat clients along with gzip.

location ~* /http-bind/ {       
     proxy_buffering off;
     keepalive_timeout 55;
     access_log off;
     tcp_nodelay on;
     proxy_pass http://x.x.x.x:1111;
}

Is this the best approach to managing long polling in nginx.

I also use just one worker process for altogether for web & chat (single CPU). Is that fine?

Quintin Par
  • 4,293
  • 10
  • 46
  • 72

1 Answers1

1

From nginx.org, "For Comet applications based on long-polling it is important to set proxy_buffering to off, otherwise the asynchronous response is buffered and the Comet does not work.".

proxy_buffering off;

You might want to see this thread too.

3molo
  • 4,340
  • 5
  • 30
  • 46