requestsI was investigating the connection timeout when using the library, but I had some doubts and asked me a question.
I think connect timeout is the waiting time to establish a connection with the other server.
If the server is down, you may be able to connect no matter how many times you try to connect, but what if it isn't down and you can't connect?
requestsWe would like to use this as a basis for making decisions when setting the connection timeout time when using, so we would appreciate your advice.

The article I referred to isHereWill be.

  • Answer # 1

    What is the case when you cannot connect even if it is not down?

    The bandwidth of the communication path is extremely narrow (the number of data that can be sent and received per unit time is small), and it takes time to establish a connection.

    The connection is blocked by the firewall on the server side and the side that listens to the port. It could be a router, or it could be the machine on which the server is running. Depending on how you block it, there will be no response from the server side, so it will also time out.

    I think there are other things, but these are the two main things that came to my mind about TCP.