[JDK-8257080] Java does not try all DNS results when opening a socket
Alan Bateman
Alan.Bateman at oracle.com
Fri Dec 18 10:21:10 UTC 2020
On 18/12/2020 09:23, Benjamin Marwell wrote:
> Sounds good to me, but – to be honest – a simpler solution would be
> enough for now, at least for me. I actually need something which works
> on Java 8.
>
> I also want to share an excerpt from an RFC:
>
>
> RFC 1123
>
> 2.3 Applications on Multihomed hosts
> … Application protocol implementations **SHOULD** be prepared
> to try multiple addresses from the list until success is obtained. …
>
> SRC: https://tools.ietf.org/html/rfc1123
> <https://tools.ietf.org/html/rfc1123>
>
> Java sadly does not implement this.
>
True although a library or application using the Socket or SocketChannel
APIs can cycle through the addresses too. I think there is general
agreement here that having some support for this in the Java platform
would be useful but I think it will require exploration and prototypes
in order to see what new APIs and specification changes will be required
to support it.
-Alan
More information about the net-dev
mailing list