Welcome! Log In Create A New Profile

Advanced

Re: Is it possible that nginx will not buffer the client body?

All files from this thread

File Name File Size   Posted by Date  
no_buffer.patch 38.8 KB open | download 姚伟斌 01/13/2013 Read message
100 bytes open | download Weibin Yao 02/26/2013 Read message
no_buffer_v5.patch 39.2 KB open | download Weibin Yao 03/14/2013 Read message
Weibin Yao
February 21, 2013 09:08PM
Use the patch I attached in this mail thread instead, don't use the pull
request patch which is for tengine.

Thanks.

2013/2/22 Pasi Kärkkäinen <pasik@iki.fi>

> On Fri, Jan 18, 2013 at 10:38:21AM +0200, Pasi Kärkkäinen wrote:
> > On Thu, Jan 17, 2013 at 11:15:58AM +0800, ?????? wrote:
> > > Yes. It should work for any request method.
> > >
> >
> > Great, thanks, I'll let you know how it works for me. Probably in two
> weeks or so.
> >
>
> Hi,
>
> Adding the tengine pull request 91 on top of nginx 1.2.7 doesn't work:
>
> cc1: warnings being treated as errors
> src/http/ngx_http_request_body.c: In function
> 'ngx_http_read_non_buffered_client_request_body':
> src/http/ngx_http_request_body.c:506: error: implicit declaration of
> function 'ngx_http_top_input_body_filter'
> make[1]: *** [objs/src/http/ngx_http_request_body.o] Error 1
> make[1]: Leaving directory `/root/src/nginx/nginx-1.2.7'
> make: *** [build] Error 2
>
> ngx_http_top_input_body_filter() cannot be found from any .c/.h files..
> Which other patches should I apply?
>
> Perhaps this?
> https://github.com/cfsego/limit_upload_rate/blob/master/for-nginx.patch
>
>
> Thanks,
>
> -- Pasi
>
> >
> > > 2013/1/16 Pasi KÀrkkÀinen <[1]pasik@iki.fi>
> > >
> > > On Sun, Jan 13, 2013 at 08:22:17PM +0800, ?????? wrote:
> > > > Â Â This patch should work between nginx-1.2.6 and nginx-1.3.8.
> > > > Â Â The documentation is here:
> > >
> > > > Â Â ## client_body_postpone_sending ##
> > > > Â Â Syntax: **client_body_postpone_sending** `size`
> > > > Â Â Default: 64k
> > > > Â Â Context: `http, server, location`
> > > > Â Â If you specify the `proxy_request_buffering` or
> > > > Â Â `fastcgi_request_buffering` to be off, Nginx will send the
> body
> > > to backend
> > > > Â Â when it receives more than `size` data or the whole
> request body
> > > has been
> > > > Â Â received. It could save the connection and reduce the IO
> number
> > > with
> > > > Â Â backend.
> > > >
> > > > Â Â ## proxy_request_buffering ##
> > > > Â Â Syntax: **proxy_request_buffering** `on | off`
> > > > Â Â Default: `on`
> > > > Â Â Context: `http, server, location`
> > > > Â Â Specify the request body will be buffered to the disk or
> not. If
> > > it's off,
> > > > Â Â the request body will be stored in memory and sent to
> backend
> > > after Nginx
> > > > Â Â receives more than `client_body_postpone_sending` data. It
> could
> > > save the
> > > > Â Â disk IO with large request body.
> > > >
> > > >
> > > > Â Â Â Â Â Â Note that, if you specify it to be off, the
> nginx
> > > retry mechanism
> > > > Â Â with unsuccessful response will be broken after you sent
> part of
> > > the
> > > > Â Â request to backend. It will just return 500 when it
> encounters
> > > such
> > > > Â Â unsuccessful response. This directive also breaks these
> > > variables:
> > > > Â Â $request_body, $request_body_file. You should not use these
> > > variables any
> > > > Â Â more while their values are undefined.
> > > >
> > >
> > > Hello,
> > >
> > > This patch sounds exactly like what I need aswell!
> > > I assume it works for both POST and PUT requests?
> > >
> > > Thanks,
> > >
> > > -- Pasi
> > >
> > > > Â Â Â Hello!
> > > > Â Â Â @yaoweibin
> > > >
> > > > Â Â Â Â If you are eager for this feature, you could try my
> > > > Â Â Â Â patch: [2][2]
> https://github.com/taobao/tengine/pull/91.
> > > This patch has
> > > > Â Â Â Â been running in our production servers.
> > > >
> > > > Â Â Â what's the nginx version your patch based on?
> > > > Â Â Â Thanks!
> > > >    On Fri, Jan 11, 2013 at 5:17 PM, Ã*Å Ã*°±ó
> > > <[3][3]yaoweibin@gmail.com> wrote:
> > > >
> > > > Â Â Â Â I know nginx team are working on it. You can wait
> for it.
> > > > Â Â Â Â If you are eager for this feature, you could try my
> > > > Â Â Â Â patch: [4][4]
> https://github.com/taobao/tengine/pull/91.
> > > This patch has
> > > > Â Â Â Â been running in our production servers.
> > > >
> > > > Â Â Â Â 2013/1/11 li zJay <[5][5]zjay1987@gmail.com>
> > > >
> > > > Â Â Â Â Â Hello!
> > > > Â Â Â Â Â is it possible that nginx will not buffer the
> client
> > > body before
> > > > Â Â Â Â Â handle the request to upstream?
> > > > Â Â Â Â Â we want to use nginx as a reverse proxy to upload
> very
> > > very big file
> > > > Â Â Â Â Â to the upstream, but the default behavior of
> nginx is to
> > > save the
> > > > Â Â Â Â Â whole request to the local disk first before
> handle it
> > > to the
> > > > Â Â Â Â Â upstream, which make the upstream impossible to
> process
> > > the file on
> > > > Â Â Â Â Â the fly when the file is uploading, results in
> much high
> > > request
> > > > Â Â Â Â Â latency and server-side resource consumption.
> > > > Â Â Â Â Â Thanks!
> > > > Â Â Â Â Â _______________________________________________
> > > > Â Â Â Â Â nginx mailing list
> > > > Â Â Â Â Â [6][6]nginx@nginx.org
> > > > Â Â Â Â Â [7][7]
> http://mailman.nginx.org/mailman/listinfo/nginx
> > > >
> > > > Â Â Â Â --
> > > > Â Â Â Â Weibin Yao
> > > > Â Â Â Â Developer @ Server Platform Team of Taobao
> > > > Â Â Â Â _______________________________________________
> > > > Â Â Â Â nginx mailing list
> > > > Â Â Â Â [8][8]nginx@nginx.org
> > > > Â Â Â Â [9][9]
> http://mailman.nginx.org/mailman/listinfo/nginx
> > > >
> > > > Â Â Â _______________________________________________
> > > > Â Â Â nginx mailing list
> > > > Â Â Â [10][10]nginx@nginx.org
> > > > Â Â Â [11][11]http://mailman.nginx.org/mailman/listinfo/nginx
> > > >
> > > > Â Â --
> > > > Â Â Weibin Yao
> > > > Â Â Developer @ Server Platform Team of Taobao
> > > >
> > > > References
> > > >
> > > > Â Â Visible links
> > > > Â Â 1. mailto:[12]zjay1987@gmail.com
> > > > Â Â 2. [13]https://github.com/taobao/tengine/pull/91
> > > > Â Â 3. mailto:[14]yaoweibin@gmail.com
> > > > Â Â 4. [15]https://github.com/taobao/tengine/pull/91
> > > > Â Â 5. mailto:[16]zjay1987@gmail.com
> > > > Â Â 6. mailto:[17]nginx@nginx.org
> > > > Â Â 7. [18]http://mailman.nginx.org/mailman/listinfo/nginx
> > > > Â Â 8. mailto:[19]nginx@nginx.org
> > > > Â Â 9. [20]http://mailman.nginx.org/mailman/listinfo/nginx
> > > > Â 10. mailto:[21]nginx@nginx.org
> > > > Â 11. [22]http://mailman.nginx.org/mailman/listinfo/nginx
> > >
> > > > _______________________________________________
> > > > nginx mailing list
> > > > [23]nginx@nginx.org
> > > > [24]http://mailman.nginx.org/mailman/listinfo/nginx
> > >
> > > _______________________________________________
> > > nginx mailing list
> > > [25]nginx@nginx.org
> > > [26]http://mailman.nginx.org/mailman/listinfo/nginx
> > >
> > > --
> > > Weibin Yao
> > > Developer @ Server Platform Team of Taobao
> > >
> > > References
> > >
> > > Visible links
> > > 1. mailto:pasik@iki.fi
> > > 2. https://github.com/taobao/tengine/pull/91
> > > 3. mailto:yaoweibin@gmail.com
> > > 4. https://github.com/taobao/tengine/pull/91
> > > 5. mailto:zjay1987@gmail.com
> > > 6. mailto:nginx@nginx.org
> > > 7. http://mailman.nginx.org/mailman/listinfo/nginx
> > > 8. mailto:nginx@nginx.org
> > > 9. http://mailman.nginx.org/mailman/listinfo/nginx
> > > 10. mailto:nginx@nginx.org
> > > 11. http://mailman.nginx.org/mailman/listinfo/nginx
> > > 12. mailto:zjay1987@gmail.com
> > > 13. https://github.com/taobao/tengine/pull/91
> > > 14. mailto:yaoweibin@gmail.com
> > > 15. https://github.com/taobao/tengine/pull/91
> > > 16. mailto:zjay1987@gmail.com
> > > 17. mailto:nginx@nginx.org
> > > 18. http://mailman.nginx.org/mailman/listinfo/nginx
> > > 19. mailto:nginx@nginx.org
> > > 20. http://mailman.nginx.org/mailman/listinfo/nginx
> > > 21. mailto:nginx@nginx.org
> > > 22. http://mailman.nginx.org/mailman/listinfo/nginx
> > > 23. mailto:nginx@nginx.org
> > > 24. http://mailman.nginx.org/mailman/listinfo/nginx
> > > 25. mailto:nginx@nginx.org
> > > 26. http://mailman.nginx.org/mailman/listinfo/nginx
> >
> > > _______________________________________________
> > > nginx mailing list
> > > nginx@nginx.org
> > > http://mailman.nginx.org/mailman/listinfo/nginx
> >
> > _______________________________________________
> > nginx mailing list
> > nginx@nginx.org
> > http://mailman.nginx.org/mailman/listinfo/nginx
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>



--
Weibin Yao
Developer @ Server Platform Team of Taobao
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Is it possible that nginx will not buffer the client body?

lm011111 January 11, 2013 02:22AM

Re: Is it possible that nginx will not buffer the client body?

姚伟斌 January 11, 2013 04:18AM

Re: Is it possible that nginx will not buffer the client body?

lm011111 January 13, 2013 04:02AM

Re: Is it possible that nginx will not buffer the client body? Attachments

姚伟斌 January 13, 2013 07:24AM

Re: Is it possible that nginx will not buffer the client body?

Pasi Kärkkäinen January 16, 2013 10:16AM

Re: Is it possible that nginx will not buffer the client body?

姚伟斌 January 16, 2013 10:18PM

Re: Is it possible that nginx will not buffer the client body?

Pasi Kärkkäinen January 18, 2013 03:40AM

Re: Is it possible that nginx will not buffer the client body?

Pasi Kärkkäinen February 21, 2013 03:10PM

Re: Is it possible that nginx will not buffer the client body?

Weibin Yao February 21, 2013 09:08PM

Re: Is it possible that nginx will not buffer the client body?

Pasi Kärkkäinen February 22, 2013 04:26AM

Re: Is it possible that nginx will not buffer the client body?

Pasi Kärkkäinen February 22, 2013 05:52AM

Re: Is it possible that nginx will not buffer the client body?

Weibin Yao February 24, 2013 09:14PM

Re: Is it possible that nginx will not buffer the client body?

Pasi Kärkkäinen February 25, 2013 05:14AM

Re: Is it possible that nginx will not buffer the client body? Attachments

Weibin Yao February 26, 2013 09:14AM

Re: Is it possible that nginx will not buffer the client body?

Pasi Kärkkäinen March 05, 2013 08:18AM

Re: Is it possible that nginx will not buffer the client body?

double March 07, 2013 12:25PM

Re: Is it possible that nginx will not buffer the client body?

Pasi Kärkkäinen March 07, 2013 12:50PM

Re: Is it possible that nginx will not buffer the client body?

Pasi Kärkkäinen March 14, 2013 04:46AM

Re: Is it possible that nginx will not buffer the client body?

Pasi Kärkkäinen March 08, 2013 08:38AM

Re: Is it possible that nginx will not buffer the client body? Attachments

Weibin Yao March 14, 2013 01:18AM

Re: Is it possible that nginx will not buffer the client body?

Pasi Kärkkäinen March 14, 2013 04:40AM

Re: Is it possible that nginx will not buffer the client body?

Pasi Kärkkäinen March 20, 2013 01:04PM

Re: Is it possible that nginx will not buffer the client body?

double February 28, 2013 10:16AM

Re: Is it possible that nginx will not buffer the client body?

EDevil February 28, 2013 12:38PM

Re: Is it possible that nginx will not buffer the client body?

Maxim Dounin February 28, 2013 01:14PM

Re: Is it possible that nginx will not buffer the client body?

double March 05, 2013 06:24AM

Re: Is it possible that nginx will not buffer the client body?

Pasi Kärkkäinen March 14, 2013 10:14AM

Re: Is it possible that nginx will not buffer the client body?

Weibin Yao March 18, 2013 12:22AM

Re: Is it possible that nginx will not buffer the client body?

double April 04, 2013 04:30AM

Re: Is it possible that nginx will not buffer the client body?

Valentin V. Bartenev February 28, 2013 01:52PM

Re: Is it possible that nginx will not buffer the client body?

EDevil February 28, 2013 02:04PM

Re: Is it possible that nginx will not buffer the client body?

Pasi Kärkkäinen March 01, 2013 08:24AM

Re: Is it possible that nginx will not buffer the client body?

double March 01, 2013 10:17AM

Re: Is it possible that nginx will not buffer the client body?

daveyfx January 11, 2013 02:31PM

Re: Is it possible that nginx will not buffer the client body?

double February 26, 2013 04:10PM

Re: Is it possible that nginx will not buffer the client body?

double April 18, 2013 05:27AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 217
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready