I want to use nginx as a https frontend and I'm looking for a way to limit TCP connections. These limits should be based on the remote IP addresses and work for HTTP/1.1 as well as HTTP 2.
For HTTP/1.1 I thought I would be fine around 15 concurrent connections per IP (since most browsers seems to use at most 6), wich should be more than enough for HTTP/2. But the nginx docs states:
In HTTP/2 and SPDY, each concurrent request is considered a separate connection.
And the HTTP/2 spec states about the SETTINGS_MAX_CONCURRENT_STREAMS
parameter:
It is recommended that this value be no smaller than 100, so as to not unnecessarily limit parallelism.
Does this mean that I should allow at least 100 connections per remote IP? It seems so in my tests, but maybe I'm missing something. Because this seams to essentially mean that I can't set any meaningful limits for the number of concurrent TCP connections, without seriously limiting HTTP/2.