wandenberg / nginx-push-stream-module

A pure stream http push technology for your Nginx setup. Comet made easy and really scalable.
Other
2.22k stars 295 forks source link

why push_stream_subscriber not support keepalive connections #8

Closed mean-cj closed 10 years ago

mean-cj commented 12 years ago

Hello wandenberg

Thank you very much for your share. i have a question, why push_stream_subscriber not support "push_stream_keepalive" i see the facebook have enable keep alive for pulling

push_stream_keepalive syntax: push_stream_keepalive on | off default: off context: location (push_stream_publisher, push_stream_channels_statistics) release version: 0.2.4 Enable keepalive connections, on publisher or channels statistics locations.

Thank you for answer. Mean.

lvella commented 12 years ago

I am also interested in this, it is a very useful feature for Long Polling.

wandenberg commented 12 years ago

Hello Mean,

sorry for the late response.

I don't know why but Nginx server set keepalive to 0 when I disable the chunked filter. And I disable this filter because as the same message is delivered to many users I use the same chunk to all subscribers, saving some bytes which chunked filter doesn't.

I will suggest a patch to Nginx developers and if they accept we can use keep alive on subscribers too.

Regards, Wandenberg

On Tue, Dec 6, 2011 at 11:15 AM, Mean-CJ < reply@reply.github.com

wrote:

Hello wandenberg

Thank you very much for your share. i have a question, why push_stream_subscriber not support "push_stream_keepalive" i see the facebook have enable keep alive for pulling

push_stream_keepalive syntax: push_stream_keepalive on | off default: off context: location (push_stream_publisher, push_stream_channels_statistics) release version: 0.2.4 Enable keepalive connections, on publisher or channels statistics locations.

Thank you for answer. Mean.


Reply to this email directly or view it on GitHub: https://github.com/wandenberg/nginx-push-stream-module/issues/8

yirkha commented 11 years ago

Hi, I encountered this problem as well, because we were using long-polling connections in some project at work, and I solved it on push_stream_module's side only. The patch, including comments about the cause and my solution, is available here: https://gist.github.com/yirkha/6354728

wandenberg commented 11 years ago

Hi, try the code on branch 0.4.x, it already supports keep alive connections, it will be released soon. On Aug 27, 2013 12:10 PM, "Jiří Hruška" notifications@github.com wrote:

Hi, I encountered this problem as well, because we were using long-polling connections in some project at work, and I solved it on push_stream_module's side only. The patch, including comments about the cause and my solution, is available here: https://gist.github.com/yirkha/6354728

— Reply to this email directly or view it on GitHubhttps://github.com/wandenberg/nginx-push-stream-module/issues/8#issuecomment-23344097 .

yirkha commented 11 years ago

Ah, OK, didn't notice the branch.

wandenberg commented 10 years ago

This was solved on tag 0.4.0 3d3a204177d3a7ab8a2858e04e792a6d11bf133f