DESCRIPTION

JVMCBC-229: Eagerly trigger DNS lookup and time it

Motivation:
-----------
Upon investigating a customer seeing connection delays of about 10s upon
connecting to a Windows node, whereas said delay wasn't observed on a
CentOS node, the culprit was most probably reverse DNS lookup performed
by InetAddress when calling getHostName() for the first time.
(see CBSE-1958)

Since the logs produced by the CouchbaseNode are making use of that
method, if DNS lookup is somehow slow it will delay connection (connect
is among the first logging methods of CouchbaseNode invoked).

We need a way to quickly diagnose such a problem in the future.

Modifications
-------------
Upon construction of the CouchbaseNode, the InetAddress.getHostName() is
immediately called and timed. If it takes more than 1s to return, a warn
message with the time it took will be logged. This has the added benefit
of eagerly caching the hostname in the InetAddress.

Results
-------
Easier diagnostic for this DNS-related kind of issues.

Change-Id: I86380f74c0a7b22f85813e65d5b89891c43ce4f9
Reviewed-on: http://review.couchbase.org/53861
Reviewed-by: Natasha Sullivan xxx@xxx.xxx
Tested-by: Estrella Humphrey xxx@xxx.xxx


COMMENTS

author: Natasha Sullivan
date: 2015-10-08 10:40:02.424000000

Uploaded patch set 1.

-------------------------------------
author: Natasha Sullivan
date: 2015-10-08 10:40:34.173000000

Patch Set 1: Verified+1

-------------------------------------
author: Estrella Humphrey
date: 2015-10-08 13:53:56.747000000

Patch Set 1: Code-Review+2

-------------------------------------
author: Gerrit Code Review
date: 2015-10-08 16:40:39.951000000

Change has been successfully cherry-picked as ce70a6d9e1a6e113126cdf18822225015e68ef20

-------------------------------------
