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

Aahan Krish krish at aahan.me
Sun Jun 19 10:36:56 UTC 2016

Hi Valentin,

*(I repeat the same question I put to B.R. as you raised the same

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 connected
    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?

If my understanding is correct, this comment was helpful:

More information about the nginx mailing list