Welcome! Log In Create A New Profile

Advanced

Re: Why set keepalive_timeout to a short period when Nginx is great at handling them?

Valentin V. Bartenev
June 19, 2016 09:46AM
On Sunday 19 June 2016 16:06:56 Aahan Krish wrote:
> Hi Valentin,
>
> *(I repeat the same question I put to B.R. as you raised the same
> point.)*
>
> So you are referring to the 4-tuple (source_IP, source_port,
> server_IP, server_port) socket limitation, correct? I just came to
> know about this and it's interesting. Please tell me if this
> understanding of mine is correct:
>
> So a server identifies a user's connection based on a combination
> of: user's internet connection's IP + port the user's client is
> connecting from (e.g. Chrome on 8118, IE on 8080, etc.) +
> server IP + server_port (80 for HTTP / 443 for HTTPS).
>
> And the limitation is that a maximum of ~ 65536 clients all on
> same port (say all are using Chrome and therefore connecting from
> 8118) can connect simultaneously to a web server that is connectedl
> to the internet via 1 public IP address and port 80 (let's say
> HTTP only), IFF the resources of the server permit.
>
> And that means I can double the no. of connections (2x 65536 per
> second) my server can handle, if it has enough resources in the
> first place (i.e. sufficient RAM, CPU, I/O capacity or whatever
> is relevant) by simply adding another public IP address to my
> server and making sure that the traffic is load-balanced between
> the two public IPs of the server.
>
> Am I correct?
[..]

No, first of all, there's no limitation of 65535 clients.

1. Clients usually use different IPs, so one element of 4-tuple already
different.

Even if they are behind NAT, that only limits number of connections
from one public IP of that gateway, not all clients of your server.

2. Chrome, IE, etc. don't use the same port each time for outgoing
connections.

wbr, Valentin V. Bartenev

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

Why set keepalive_timeout to a short period when Nginx is great at handling them?

Aahan Krish June 18, 2016 07:28AM

Re: Why set keepalive_timeout to a short period when Nginx is great at handling them?

B.R. June 18, 2016 08:14AM

Re: Why set keepalive_timeout to a short period when Nginx is great at handling them?

Aahan Krish June 18, 2016 11:30AM

Re: Why set keepalive_timeout to a short period when Nginx is great at handling them?

Valentin V. Bartenev June 19, 2016 04:54AM

Re: Why set keepalive_timeout to a short period when Nginx is great at handling them?

Aahan Krish June 19, 2016 06:56AM

Re: Why set keepalive_timeout to a short period when Nginx is great at handling them?

Valentin V. Bartenev June 19, 2016 09:46AM

Re: Why set keepalive_timeout to a short period when Nginx is great at handling them?

Aahan Krish June 19, 2016 10:48AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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