On Jul 20, 2013, at 11:52 , momyc wrote:
>> it is useless to buffer a long polling connection in a file.
>
> For Nginx there is no any difference between long-polling or other request.
> It would't even know. All it should care is how much to buffer and for how
> long to keep those buffers until droping them and aborting request. I do not
> see any technical problem here.
There is no technical problem. There is an issue of practical utility of
such backend. There are two types of backend:
1) The first one uses a large amount of memory to process request. It should
send a generated response as soon as possible and then moves to a next request.
nginx can buffer thousands of such responses and sends them to clients.
Persistent connection between nginx and backend and nginx buffering help in
this case. Multiplexing just complicates the backend logic without any benefit.
The bottle neck here is not number of connections to a single listen port (64K)
but amount of memory.
2) The second type of backend uses a small amount of memory per request,
can process simultaneously thousands of clients and does NOT need buffering
at all. Multiplexing helps such backends but only together with a flow control.
--
Igor Sysoev
http://nginx.com/services.html
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx