When connecting to Region server, HBase is not caching the DNS lookup result, resulting flooding the DNS service. (DDOS of the DNS server)
https://issues.apache.org/jira/browse/HBASE-4220
Critical
No.
No
The entire network is slow
0.92.0 --- manually reverse the patch.
Standard
Run the YCSB (or any long running) workload.
No particular timing order requirement
Yes.
Sure. Just lots of request.
Theoretically, just 1 (master + region server)
This is a performance bug, so we will notice the performance degradation, and use networking tools such as netstat to see it’s because too many DNS requests.
Once we realize that this is a DNS problem, we will examine how HBase performs DNS lookups. Before the fix, HBase is using this function for the DNS lookup:
public HServerAddress getServerAddress() {
return new HServerAddress(this.hostname, this.port);
}
Which further calls:
/**
* @param hostname Hostname
* @param port Port number
*/
public HServerAddress(final String hostname, final int port) {
this(getResolvedAddress(new InetSocketAddress(hostname, port)));
}
private static InetSocketAddress getResolvedAddress(InetSocketAddress address) {
String bindAddress = getBindAddressInternal(address);
int port = address.getPort();
return new InetSocketAddress(bindAddress, port);
}
So everytime, it is creating a new socket!
Every DNS lookup HBase is creating a new socket; Instead it should simply cache the DNS lookups.
Semantic
Every DNS lookup we should use another api -- which performs the caching:
Addressing#createHostAndPortStr(String, int)}
*/
public synchronized String getHostnamePort() {
if (this.cachedHostnamePort == null) {
this.cachedHostnamePort =
Addressing.createHostAndPortStr(this.hostname, this.port);
}
return this.cachedHostnamePort;
}