I have nginx proxying to my application, and I am doing long-polling. Instead of ending the request, I am just flushing the data after each message. When I have `ssl off` and `proxy_buffering off`, it works -- nginx flushes data without delay. If I enable SSL, it still works if the messages are small and rare. However, if I ever flush 60k in under a second, it changes its behavior for the rest of the request. It will no longer flush when I flush, and will hang onto its buffers indefinitely, waiting for the buffers to fill or the request to end. Changing the ssl_buffer_size to 1 makes it again flush when it should, but it becomes very slow.
Is there any way to get nginx to always flush ssl buffers when I flush them, and not switch to this buffering mode? If not, could such a feature be added? Is this behavior outside of nginx's control?
I assume other proxy servers are also likely to cause unwanted buffering, so perhaps the answer is to end the request after each message.
Edited 1 time(s). Last edit at 12/29/2014 07:00PM by nickretallack.