I'm trying to understand the difference between connection-timeout and idle-timeout for server.netty application configuration in spring-boot.
I was under the impression that
- connection-timeout: refers to the maximum time that application server will wait for a client to send a request after a TCP connection has been established.
- idle-timeout: amount of time an established connection remains open.
However, when I ran the following command setting connection-timeout to 10s and leaving idle-timeout to infinite.
$ time nc -vv localhost 8080
localhost [127.0.0.1] 8080 (http-alt) open
...
The connection did not timeout after 10s. However, setting the idle-connection to 10s does timeout the connection.
Question:
What is the difference between the two timeouts? I've read the spring boot doc but I did not get a functional understanding of the config.