Hostname resolution

Cloudera recommends using DNS for hostname resolution. The usage of /etc/hosts becomes cumbersome quickly, and is routinely the source of hard-to-diagnose problems.

/etc/hosts should contain an entry for, and localhost should be the only name that resolves to it. The file should also contain an entry for the system’s IP address, FQDN, and shortname. The machine name must not resolve to the address. All hosts in the cluster must have forward and reverse lookups to be the inverse of each other. An easy test to perform on the hosts to ensure proper DNS resolution is to run the following commands:
dig [***HOSTNAME***]
For example:
dig	1758	IN	A

dig -x 3513 IN		PTR

This is the acceptable behavior for every host in the cluster.

Also, enable nscd with only hostname caching enabled for a 30-60 second period. This further reduces heavy DNS impact. This is a mitigation technique for preventing the overload of AD DNS, for example, which can fail over during high DNS load.
enable-cache passwd no
enable-cache group no
enable-cache hosts yes
positive-time-to-live hosts 60
negative-time-to-live hosts 20