Welcome! Log In Create A New Profile

Advanced

Re: typical value(s) for stream/limit_conn

Francis Daly
September 20, 2016 04:28PM
On Mon, Sep 19, 2016 at 09:53:38AM -0400, itpp2012 wrote:

Hi there,

> Plenty of guidelines for http limit_conn but hardly any for stream, what
> would be a typical value in which cases?
> Has anyone done some log/connection analysis to determine what would be
> typical use?

"stream" is "arbitrary tcp connections". There is no "typical", I think.

If you are using "stream" to handle things that are typically one
long-lasting tcp connection, such as ssh-for-terminal, then you'll
probably be ok with a small number (unless you have multiple clients
appearing as the same "key" (often IP address).

If you are using "stream" to handle things that are typically many
overlapping short-lasting tcp connections (simple cgi mysql clients,
perhaps), then you'll probably want a bigger number.

But a number that is right in your environment for port 389 may be
completely wrong for port 37, for example.

If you are trying to limit based on avoid-abuse, you will need to assess
what is "normal" in your case, and define something else as "too much".

If you are trying to limit based on avoid-overload, you will need to
assess what your backends can handle, and set the limit near that.

(In the latter case, you would presumably not limit based on
$binary_remote_addr, but on something static to limit the total number
of connections, I guess.)

> Atm. I'd say '5', but this is more a feeling then science.

5 could work.

5 per $remote_port might be too many.

This is very much "it depends".

Cheers,

f
--
Francis Daly francis@daoine.org

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

typical value(s) for stream/limit_conn

itpp2012 September 19, 2016 09:53AM

Re: typical value(s) for stream/limit_conn

itpp2012 September 20, 2016 03:42PM

Re: typical value(s) for stream/limit_conn

Francis Daly September 20, 2016 04:28PM

Re: typical value(s) for stream/limit_conn

Francis Daly September 20, 2016 04:30PM

Re: typical value(s) for stream/limit_conn

itpp2012 September 20, 2016 04:51PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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