Welcome! Log In Create A New Profile

Advanced

Re: request body and client_body_buffer_size

Maxim Dounin
September 16, 2013 03:16AM
Hello!

On Sat, Sep 14, 2013 at 11:15:39AM -0700, Jeroen Ooms wrote:

> @ Maxim Dounin
>
> Thanks! This is very helpful. I have also set:
>
> client_body_buffer_size 1m;
>
> Could this setting have any side effects? I am not expecting too many
> large POST request. From what I read, client_body_buffer_size is
> actually the maximum amount of memory allocated. Does this mean that
> for small requests (e.g. without a body) there is no additional
> overhead introduced by raising this value?

Yes, it's not allocated if there is no request body, and only
needed buffer is allocated if a request body is known to be
smaller. On the other hand, it can be used as a DoS vector if an
attacker is allowed to open many connections but you can't afford
them all to allocate client_body_buffer_size buffer.

Additionally, using such a big $request_body in proxy_cache_key
implies various overheads. In particular, proxy_buffer_size should
be set big enough to be able to contain cache header with a key.
Not even talking about reading/writing cache files with such keys.

--
Maxim Dounin
http://nginx.org/en/donation.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

request body and client_body_buffer_size

Jeroen Ooms September 13, 2013 08:58PM

Re: request body and client_body_buffer_size

Maxim Dounin September 16, 2013 03:16AM

Re: request body and client_body_buffer_size

Maxim Dounin September 16, 2013 03:16AM

Re: request body and client_body_buffer_size

Jeroen Ooms September 16, 2013 03:16AM

Re: request body and client_body_buffer_size

Jeroen Ooms September 25, 2013 08:44PM

Re: request body and client_body_buffer_size

Maxim Dounin September 26, 2013 08:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 173
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