RFR: 8313356: Improve address selection in sun.net.NetworkClient
Alan Bateman
alanb at openjdk.org
Sat Jul 29 12:14:40 UTC 2023
On Fri, 28 Jul 2023 22:37:00 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:
> Please review this fix for [JDK-8313356](https://bugs.openjdk.org/browse/JDK-8313356), which improves address selection in `sun.net.NetworkClient` to consider all addresses returned by `InetAddress.getAllByName` instead of only connecting to the first one.
>
> This follows the approach described in [JDK-8170568](https://bugs.openjdk.org/browse/JDK-8170568).
The is a significant change to long standing behavior and will require discussion/consensus. It's probably a bit premature to create a PR without discussion on how it may be observed by existing deployments when the connection to the first address cannot be established. It also interacts with the "connect timeout", either changing its semantics or requiring adjustment for second/subsequent attempts. There is also the question on whether it would be better to focus on newer HTTP client rather than trying to get the legacy HTTP and HTTPS protocol handlers to support this.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15078#issuecomment-1656716861
More information about the net-dev
mailing list