clustermode dns load balance

KB ID: 1012400 Version: 3.0 Published date: 02/14/2012 

Description

This document explains how to set up DNS Zone load balancing on a pair of storage controller LIFs. This is different than external DNS Load Balancing. This balancing method is contained within the storage controller.

Procedure

Configure 2 LIFs, one on each node (Only 2 nodes in this example).

cluster1::> network interface show -vserver pod2vs1
Logical    Status     Network            Current       Current Is
Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home
----------- ---------- ---------- ------------------ ------------- ------- ----
nc
pod2vs1-nas2 up/up    10.98.163.72/16   cluster1-01   e0d     true
pod2vs1-nas1 up/up    10.98.163.73/16   cluster1-02   e0d     true

Configure the interfaces for a dns-zone. This effectively allows the DNS server running on the cluster to answer name lookups for the dns-zone and LIF specified:

cluster1::> network interface modify -vserver pod2vs1 -lif pod2vs1-nas2 -dns-zone nc.zippy.com
cluster1::> network interface modify -vserver pod2vs1 -lif pod2vs1-nas1 -dns-zone nc.zippy.com

The DNS Zone is basically a contained DNS server on the storage controller.

On your main DNS server and set up a forwarder entry for the dns-zone that includes the LIF interface IP addresses.

In a Microsoft Windows 2003/2008 AD / DNS environment:

Windows Server 2003/2008 supports delegation to delegate DNS requests for sub-domains to external DNS servers. Use a delegation to delegate requests for the Cluster-Mode system to it's builtin DNS server.

  1. Click Start, point to Administrative Tools, then click DNS.
  2. Open Forward Lookup Zones and find the parent domain, e.g zippy.com
  3. Right-click zippy.com and click the New Delegation ...
  4. Enter the name of the delegated domain, e.g enter nc and the dialog will show nc.zippy.com as FQDN
  5. In the Name Server dialog, enter the FQDN and IP addresses of the Cluster-Mode system which you want to act as DNS servers. Usually you specify the address of a vservers management LIF. E.g. nc-mgmt.zippy.com as FQDN (you need to create a new host entry with nc-mgmt in the parent domain), 10.98.163.72 as IP.
  6. Click Next and than Finish.

 

In a Unix or Linux BIND environment:

BIND can be configured in Unix or Linux environments to take advantage of DNS delegation.

Configure the site-wide DNS server to forward requests for the new zone, and associate the desired LIFs with each zone:

ns01# vi named.conf

zone "nc.zippy.com" IN {
type slave;
masters {10.98.163.72; 10.98.163.73;};
};

 

Test the configuration:

Once the DNS information has been propagated use nslookup to test the resolution and balancing:

  C:\Documents and Settings\Administrator>nslookup nc.zippy.com
Server: w3k2.cs.spin.eng.netapp.com
Address: 10.98.161.202
Name: nc.zippy.com
Address: 10.98.163.73

  C:\Documents and Settings\Administrator>nslookup nc.zippy.com
Server: w3k2.cs.spin.eng.netapp.com
Address: 10.98.161.202
Name: nc.zippy.com
Address: 10.98.163.72

There are other options associated with the LIF on the storage controller such as:

  (network interface modify ... )
* -allow-lb-migrate true|false
* -lb-weight load|0..100

The -allow-lb-migrate true option will allow the LIF to be migrated based on failover rules to an underutilized port on another head. Pay close attention to the failover rules because an incorrect port may cause a problem. A good practice would be to leave the value false unless you're very certain about your load distribution.

The -lb-weight load option takes the system load into account. CPU, throughput and number of open connections are measured when determining load. These currently cannot be changed.

The -lb-weight 1..100 value for the LIF is like a priority. If you assign a value of 1 to LIF1, and a value of 10 to LIF2, LIF1 will be returned 10 times more often than LIF2. An equal numeric value will round robin each LIF to the client. This would be equivalent to DNS Load Balancing on a traditional DNS Server.

To measure client connectivity, look at the clients to see where they are connected to or collect client stats as follows:

  ex3::statistics*> statistics settings modify -client-stats enabled -max-clients-to-view 100

Warning: System performance may be significantly impacted. Are you sure?
Do you want to continue? {y|n}: y

  ex3::statistics*> show -node ex2 -category client -object 10.98.163.* -counter volumes

This will report all hosts in the 10.98.163.x/24 network that are accessing volumes (and which volumes) on which heads. You should see a good balance depending on the dns-zone setup you have configured.

For extended testing,login via the diag user into the systemshell and view the files:

  /mroot/etc/mlog/messages.log

  000000a8.0000276a 000b0bfd Fri Jan 22 2010 14:18:19 -05:00 [daemon_named:info:2548] Zone: nc.zippy.com num_vifs: 2
000000a8.0000276b 000b0bfd Fri Jan 22 2010 14:18:19 -05:00 [daemon_named:info:2548] Vif: 10.98.163.72 thresh: 62.375000
000000a8.0000276c 000b0bfd Fri Jan 22 2010 14:18:19 -05:00 [daemon_named:info:2548] Vif: 10.98.163.73 thresh: 124.750000
000000a8.0000276d 000b0bfd Fri Jan 22 2010 14:18:19 -05:00 [daemon_named:info:2548] zone in-addr.arpa/IN: loaded serial 1

  /tmp/zone.weights

This file will have the LIF list and the corresponding weights. The higher the weight, the more likely it is to receive the next connection from a client.

Example:

  • One client connected to one LIF on HeadA
  • One client connected to one LIF on HeadB

  ex3% cat zone.weights
1
nc.zippy.com 2
10.98.163.72 62.375000
10.98.163.73 62.250000

The value will change based on load if the LIF is set up for load (-lb-weight load).

On a client, start a dd against the mount:

  [root@centos-5 flex]# dd if=/dev/urandom of=testing.a.file bs=4096 count=100000
100000+0 records in
100000+0 records out
409600000 bytes (410 MB) copied, 90.4082 seconds, 4.5 MB/s

View the zone.weights file in /tmp on the storage controller to see the changes:

  ex3% cat zone.weights
1
nc.zippy.com 2
10.98.163.72 62.374798
10.98.163.73 62.375000

The file takes a second or two to update, but it should happen fairly quickly.
Additionally, connect another client to HeadA (.72) directly and see a change in the weight of the LIF:

Client:

   [root@centos-5 mnt]# mount 10.98.163.72:/flex /mnt/flex3

Storage Controller:

  ex3% cat zone.weights
1
nc.zippy.com 2
10.98.163.72 61.749996
10.98.163.73 62.250000


 

This entry was posted in netapp. Bookmark the permalink.

Comments are closed.