Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xds: xDS server - unnecessary dns lookup (blocking) when parsing FilterChainMatch address prefixes? #11926

Open
sergiitk opened this issue Feb 27, 2025 · 1 comment · May be fixed by #11932
Open

Comments

@sergiitk
Copy link
Member

sergiitk commented Feb 27, 2025

A bit strange that EnvoyServerProtoData.CidrRange.create uses InetAddress.getByName, which will perform a DNS lookup when a hostname provided in addressPrefix:

static CidrRange create(String addressPrefix, int prefixLen) throws UnknownHostException {
return new AutoValue_EnvoyServerProtoData_CidrRange(
InetAddress.getByName(addressPrefix), prefixLen);
}
}

Should we be using Guava's InetAddresses#forString which is "deliberately avoids all nameservice lookups"?

@sergiitk
Copy link
Member Author

sergiitk commented Feb 27, 2025

JDK 22 now has InetAddress#ofLiteral for that. Took a while 😆

@sergiitk sergiitk changed the title xds: xDS server - unnecessary dns lookup when parsing FilterChainMatch address prefixes? xds: xDS server - unnecessary blocking dns lookup when parsing FilterChainMatch address prefixes? Feb 27, 2025
@sergiitk sergiitk changed the title xds: xDS server - unnecessary blocking dns lookup when parsing FilterChainMatch address prefixes? xds: xDS server - unnecessary dns lookup (blocking) when parsing FilterChainMatch address prefixes? Feb 27, 2025
@shivaspeaks shivaspeaks linked a pull request Mar 2, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant