Welcome! Log In Create A New Profile

Advanced

Re: HTTP/2: allow unlimited number of requests in connection

Maxim Dounin
July 12, 2019 10:26AM
Hello!

On Mon, Jul 01, 2019 at 11:24:28AM +0200, Michael Würtinger wrote:

> thanks a lot for your reply. Could you please elaborate a little bit
> which memory resources need to be freed periodically? How much memory
> can be held by a connection? What's the worst case scenario?
> We are currently running it in production with http2_max_requests set
> to a value so high that the connection practically lives forever and
> so far we cannot spot any problems but maybe we're missing something?

And example of "wost case" can be seen here:

http://mailman.nginx.org/pipermail/nginx/2018-July/056525.html

Memory can be allocated from the connection memory pool. And this
memory have to be freed at some point - so you have to close
the connection to do this. And that's why number of requests in a
particular connection is limited by default.

Whether or not memory allocations happens in your particular use
case - doesn't really matter, especially given that things can
change with seamingly minor configuration and/or client behaviour
changes.

In most cases we try to limit allocations from the connection
memory pool to a minimum, yet it is not always possible/convinient to
completely avoid allocations from connection memory pool. This
allows processing of thousands of requests on a single connection
without observable memory impact. Likely millions will also work
except may be in some specific use cases, yet I wouldn't recommend
allowing that many requests, just to be on the safe side.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

HTTP/2: allow unlimited number of requests in connection

Michael Würtinger 806 June 26, 2019 01:42PM

Re: HTTP/2: allow unlimited number of requests in connection

Maxim Dounin 191 June 29, 2019 06:06AM

Re: HTTP/2: allow unlimited number of requests in connection

Michael Würtinger 373 July 01, 2019 05:26AM

Re: HTTP/2: allow unlimited number of requests in connection

Maxim Dounin 375 July 12, 2019 10:26AM

Re: HTTP/2: allow unlimited number of requests in connection

chienhsw 251 March 04, 2020 02:58PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

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