proxy_buffering off; does not work!

juanzi nginx-forum at forum.nginx.org
Mon Jun 12 11:35:47 UTC 2017


Hi All,
    I tried to set proxy_buffering off in nginx.conf to avoid the buffering
time of the proxy. It was expected to work so that the proxy can immediately
transfer the response message from the server to the client.
But it did not work. Just several beginning packets are immediately
transferred. Then the proxy received about 16/17 packets with payload size
7240Bytes and then sent a 2920Bytes packet to client. Then received several
big packets from server again and then sent several big packets to client.

    The environment is:
    
   client------>proxy (nginx 1.10.0)------->server(nginx 1.10.0)

The nginx.conf of proxy is as follows:
http {
    include mime.types;
    server_tokens off;
    client_header_buffer_size 128k;
    large_client_header_buffers 4 128k;

     tcp_nodelay on;
     tcp_nopush off;
     postpone_output 0;
 
    server {
        listen    8080;
	root /root/share;

        location / {
               proxy_buffering off;
               proxy_ignore_headers X-Accel-Buffering;
               proxy_buffer_size 1k;
               #proxy_busy_buffers_size 2k;
               #proxy_buffers 20 2k;
               proxy_http_version 1.1;
              proxy_pass http://10.*.*.*:8080/test.wmv; //hide the ip
        }
    }
}

I also tried to set proxy_buffering on, and set the proxy_busy_buffers_size
to 2k. I want to let proxy transfer packet immediately by using the small
proxy_busy_buffers_size. But it also did not work.

Does anybody know why? Anybody know how to configure to get the immediate
transfer from the proxy?

Thank you very much!
Juan.

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,274808,274808#msg-274808



More information about the nginx mailing list