Somebody pointed me at the upcoming HTTP client implementation, and I'm sad to see that connection timeouts are missing from the implementation (the old HTTP API). Is the absence of connection timeouts intended or an oversight? I'd like to see it added, and it looks like a simple change to me.
http://openjdk.java.net/jeps/321 http://mail.openjdk.java.net/pipermail/jdk-dev/2018-March/000996.html There are some environments (such as AWS VPCs), where connection failures are only indicated by a connection timeout. This is because ICMP 'Destination Unreachable' packets are often not forwarded to the client (by load balancers, private links, etc) and there are supposedly some security concerns with allowing them by default. Those ICMP packets give immediate failures (net/host/protocol/port unreachable), but timeouts are slow. The default timeout is unbounded in Java, though the TCP implementation of the OS times-out connection establishment to around 130 seconds. It looks like the implementation uses SocketChannel, which still supports timeouts via chan.socket().connect(addr, timeout). Markus