I have a Scala application that uses Finagle HTTP Client to make as much as 2k requests per second each to 10 external HTTP APIs behind proxy.
I have configured the connection pool size per external host to 2000*10 (10s is request timeout) but I'm not sure if that is a valid configuration.
I don't have deep TCP/IP knowledge but I wish to know if there is a maximum limit to how many HTTP connections a JVM app can make to one remote host and how many overall outgoing connections it can make? What are the factors behind the limit? I have a vague memory that it may be related to available TCP ports but not exactly sure.
JVM does not restrict the number of connections. There are OS limits though:
see
ulimit -nvs./proc/sys/fs/file-max