diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobClient.java b/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobClient.java index 1b37b407f0dfe..16127017fa089 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobClient.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobClient.java @@ -92,10 +92,12 @@ public BlobClient(InetSocketAddress serverAddress, Configuration clientConfig) } // Establish the socket using the hostname and port. This avoids a potential issue where - // the - // InetSocketAddress can cache a failure in hostname resolution forever. + // the InetSocketAddress can cache a failure in hostname resolution forever. + // Use getHostString() instead of getHostName() to avoid unnecessary reverse DNS and DNS + // lookups when addresses are specified as IP literals. This improves reliability and + // reduces latency for each blob transfer. socket.connect( - new InetSocketAddress(serverAddress.getHostName(), serverAddress.getPort()), + new InetSocketAddress(serverAddress.getHostString(), serverAddress.getPort()), clientConfig.get(BlobServerOptions.CONNECT_TIMEOUT)); socket.setSoTimeout(clientConfig.get(BlobServerOptions.SO_TIMEOUT)); } catch (Exception e) {