Operating System - HP-UX
1835921 Members
2539 Online
110088 Solutions
New Discussion

Bind for loadsharing and cache mechanisms

 
Mark2010_1
Frequent Advisor

Bind for loadsharing and cache mechanisms

Hello,

1. We have 2 x RP4440 with HP-UX 11.1 and Bind 9.3

2. These two servers run 4 applications via forked process (many tens instance).

3. These two servers needs to communicate with a linux cluster 10 machines each one with one IP @ (Load sharing).

4. The 10 Linux machines are grouped under an external authoritative DNS server DNS1 as one name (multiple A records): prodhost.company.com

prodhost IN A 10.10.10.1
IN A 10.10.10.2
..
IN A 10.10.10.10


So our RP4440 triggers the DNS1, get the 10 IP @ in different orders (configured on DNS1) and start communication.

My questions are:

- Is there a way to configure RP4440 with Bind as cache DNS ?? if yes how ?

If we can do it

- When a process/instance will need to talk to the linux machines the flow is:

Process => gethostbyname => Cache ?

Will the gethostbyname use the first IP or is random ??

Thanks in advance.

1 REPLY 1
Matti_Kurkela
Honored Contributor

Re: Bind for loadsharing and cache mechanisms

- Is there a way to configure RP4440 with Bind as cache DNS ??

Certainly.
See this example in BIND 9.3 documentation:
http://www.isc.org/sw/bind/arm93/Bv9ARM.ch03.html#id2547334

- When a process/instance will need to talk to the linux machines...

The more detailed description of the flow is:

Process => gethostbyname => /etc/nsswitch.conf (hosts: line)
then in the order specified by the hosts line in nsswitch.conf:

* if "dns" is specified:
/etc/resolv.conf => first DNS server listed in there
** if it does not answer, then the second DNS server listed in resolv.conf etc...

* if "hosts" is specified, look up in /etc/hosts

To get the processes on your rp4440s use the local DNS cache offered by BIND, specify "nameserver 127.0.0.1" as your first nameserver in /etc/resolv.conf. Make sure that /etc/nsswitch.conf allows the use of DNS.

- Will the gethostbyname use the first IP or is it random?

The gethostbyname() function returns all the addresses at once. Usually the applications will just use the first address returned. This is why the DNS server (BIND) will randomize the order of the A records in the answer, unless configured to do otherwise:

http://www.isc.org/sw/bind/arm93/Bv9ARM.ch03.html#id2547372
http://www.isc.org/sw/bind/arm93/Bv9ARM.ch06.html#rrset_ordering

MK
MK