Manual Chapter : 3-DNS Administrator Guide v2.1: Configuring Basic Load Balancing

Applies To:

Show Versions Show Versions

3-DNS Controller versions 1.x - 4.x

  • 2.1 PTF-01, 2.1.2, 2.1.0
Manual Chapter


5

Configuring Basic Load Balancing



Getting started with load balancing

The third and final phase of installing 3-DNS Controllers is to configure load balancing modes. The 3-DNS Controllers use these load balancing modes when resolving DNS name resolution requests sent by LDNS servers.

This chapter first describes the various load balancing modes, and later describes how to configure them.

Understanding load balancing

When the 3-DNS Controller receives a name resolution request from an LDNS, the controller uses a load balancing mode to select the best available virtual server from a wide IP pool. Once the 3-DNS Controller selects the virtual server, it constructs the DNS answer, an A record (containing one or more IP addresses), and sends the answer back to the requesting client's LDNS server.

The 3-DNS Controller can choose a virtual server from a wide IP pool using either a basic load balancing mode, which selects a server based on a pre-defined pattern, or an advanced load balancing mode, which selects a server based on current performance.

The 3-DNS Controller uses load balancing modes in two situations:

  • Load balancing among multiple pools
    The 3-DNS Controller supports multiple pools. Configurations that contain two or more pools use a load balancing mode first to select a pool, and once the 3-DNS Controller selects a pool, the controller then uses a load balancing mode to choose a virtual server within the selected pool.
  • Load balancing within a pool
    Within each pool, you specify three different load balancing modes that the controller uses in sequential order: preferred, alternate, and fallback. The 3-DNS Controller first uses the preferred load balancing mode. If this load balancing mode fails, the controller then uses the alternate load balancing mode. If this load balancing mode fails, the controller uses the fallback load balancing mode. If the fallback method fails, the 3-DNS Controller returns the client to standard DNS for resolution.

    Table 5.1 shows a complete list of supported load balancing modes, and indicates where you can use each mode in the 3-DNS Controller configuration. The following sections describe how each load balancing mode works.

    Load balancing mode usage
    Load Balancing mode Pool load balancing Preferred Alternate Fallback
    Completion Rate
    x
    x
    Global Availability x x x x
    Hops
    x
    x
    Least Connections
    x x x
    Null
    x x x
    Packet Rate
    x x x
    Quality of Service
    x
    x
    Random x x x x
    Ratio x x x x
    Return to DNS
    x x x
    Round Robin x x x x
    Round trip time
    x
    x
    Static Persist
    x x x
    Topology x x x x
    VS Capacity
    x x x

Using basic, static load balancing modes

Basic load balancing modes distribute connections across the network according to predefined patterns, and take server availability into account. The 3-DNS Controller supports the following basic load balancing modes:

  • Static Persist
  • Round Robin
  • Ratio
  • Random
  • Global Availability
  • Topology
  • Null
  • Return to DNS

    The Null and Return to DNS load balancing modes are special modes that you can use to skip load balancing under certain conditions. The remaining basic load balancing modes perform true load balancing as described in the following sections.

Static Persist mode

Static Persist mode provides static persistence of LDNS servers to virtual servers; it consistently maps an LDNS IP address to the same available virtual server. This mode guarantees that certain transactions will be routed through a single transaction manager (for example, a BIG-IP Controller or other server array controller); this is beneficial for transaction-oriented traffic such as e-commerce shopping carts or online trading.

Round Robin mode

Round Robin mode distributes connections in a circular and sequential pattern among the virtual servers in a pool. Over time, each virtual server receives an equal number of connections.

Figure 5.1 shows a sample of the connection distribution pattern for Round Robin mode.

Figure 5.1 Round Robin mode

Ratio mode

Ratio mode distributes connections among a pool of virtual servers as a weighted Round Robin. For example, you can set up Ratio mode to send twice as many connections to a fast, new server, and only half as many connections to an older, slower server.

This load balancing mode requires that you define a ratio weight for each virtual server in a pool, or for each pool if you are using Ratio mode to do load balancing among multiple pools. The default ratio weight for a server or a pool is set to 1.

Figure 5.2 shows a sample connection distribution for Ratio mode.

Figure 5.2 Ratio mode

Random mode

Random mode sends connections to virtual servers in a random pattern.

Global Availability mode

Global Availability mode uses the virtual servers included in the pool in the order in which they are listed. For each connection request, this mode starts at the top of the list and sends the connection to the first available virtual server in the list. Global Availability mode moves to the next virtual server in the list only when the current virtual server is full or otherwise unavailable. Over time, the first virtual server in the list receives the most connections and the last virtual server in the list receives the least number of connections.

Topology mode

Topology allows you to direct or restrict traffic flow by entering network information into the configuration file. This allows you to develop proximity-based mapping. For example, customers in a particular geographic region can be sent to servers within that same region. The 3-DNS Controller determines the proximity of servers by comparing the client's LDNS IP address to the IP address of the available servers.

This load balancing mode requires you to do some advanced configuration planning, such as gathering the information you need to define the topology records that determine proximity of client LDNS servers to the various virtual servers.

The Topology load balancing mode is different from the topology-based access control feature. Topology-based access control actually prevents clients from connecting to specific virtual servers. You can use the topology-based access control feature in conjunction with the Topology load balancing mode. See Chapter 6 , Configuring Specialized Load Balancing , for detailed information about working with this and other topology features.

Null mode

The Null load balancing mode is a special mode you can use if you want to skip the current load balancing method, or skip to the next pool in a multiple pool configuration. For example, if you set an alternate method to Null in a pool, the 3-DNS Controller skips the alternate method and immediately tries the load balancing mode specified as the fallback method. If the fallback method is set to Null, the 3-DNS Controller either uses the next pool, if you have multiple pools, or it returns the connection request to DNS for resolution.

This mode is most useful for multiple pool configurations. For example, you can temporarily remove a specific pool from service by setting each of the methods (preferred, alternate, and fallback) to Null. You could also use the mode to limit each pool to a single load balancing mode. For example, you would set the preferred method in each pool to the desired load balancing mode, and then you would set both the alternate and fallback methods to Null in each pool. If the preferred method failed, the Null mode in both the alternate and fallback methods would force the 3-DNS Controller to go to the next pool for a load balancing answer.

Return to DNS mode

The Return to DNS mode is another special load balancing mode you can use to immediately return connection requests to DNS for resolution. This mode is particularly useful if you want to temporarily remove a pool from service, or if you want to limit a pool in a single pool configuration to only one or two load balancing attempts.

Using advanced, dynamic load balancing modes

Advanced load balancing modes distribute connections to servers that show the best current performance. The performance taken into account depends on the particular dynamic mode you are using.

All advanced load balancing modes make load balancing decisions based on the metrics collected by the big3d agents running in each data center. The big3d agents collect the information at set intervals that you can define when you set the global TTL (time to live) variables.

The 3-DNS Controller supports the following advanced load balancing modes:

  • Completion Rate
  • Least Connections
  • Packet Rate
  • Round Trip Times (RTT)
  • Hops
  • Quality of Service
  • VS Capacity

Completion Rate mode

Completion Rate mode selects a virtual server that currently maintains the least number of dropped or timed-out packets during a transaction between a data center and the client LDNS.

Figure 5.3 shows a sample connection distribution pattern for Completion Rate mode.

Figure 5.3 Completion Rate mode

Least Connections mode

Least Connections mode is also used for load balancing virtual servers managed by BIG-IP Controllers. Least Connections mode simply selects a virtual server on the BIG-IP Controller that currently hosts the fewest connections.

Packet Rate mode

Packet Rate mode selects a virtual server that is currently processing the fewest number of packets per second.

Figure 5.4 shows a sample connection distribution for Packet Rate mode.

Figure 5.4 Packet Rate mode

Round Trip Times mode

Round Trip Times (RTT) mode selects the virtual server with the fastest measured round trip time between the data center and the client LDNS. This load balancing mode requires that you run one or more big3d agents in each data center to collect the required metrics.

Figure 5.5 shows a sample connection distribution for Round Trip Times mode.

Figure 5.5 Round Trip Times mode

Hops mode

Hops mode is based on the traceroute utility, and it tracks the number of intermediate system transitions (hops) between the client LDNS and each data center. Hops mode selects a virtual server in the data center that has the fewest network hops.

Quality of Service mode

Quality of Service mode uses the current performance information, calculates an overall score for each virtual server, and then distributes connections based on each virtual server's score. The performance factors that it takes into account include:

  • Round trip time
  • Hops
  • Completion rate
  • Packet rate
  • Topology
  • VS Capacity

    Quality of Service mode is a customizable load balancing mode. For simple configurations you can easily use this mode with its default settings. For more advanced configurations, you can specify different weights for each performance factor in the equation.

    You can also configure the Quality of Service load balancing mode to use the dynamic ratio feature. With the dynamic ratio feature turned on, the Quality of Service mode becomes similar to the Ratio mode where the connections are distributed in proportion to ratio weights assigned to each virtual server. The ratio weights are based on the QOS scores: the better the score, the higher percentage of connections the virtual server receives.

    For details about customizing Quality of Service mode, see Chapter 6 , Configuring Specialized Load Balancing .

VS Capacity mode

VS Capacity mode selects the virtual server which has the most nodes up.

Configuring load balancing

This section describes how to configure load balancing. For information on how to implement the more specialized load balancing modes, see Chapter 6 , Configuring Specialized Load Balancing .

You configure load balancing at both the global and wide IP levels:

  • Global
    At the global level, you can configure default settings for the alternate and fallback load balancing modes. Then, if you don't specify alternate or fallback modes when defining a wide IP, the 3-DNS Controller uses the alternate and fallback modes you have configured at the global level. You can find instructions on how to configure global alternate and fallback modes on page 5-17 .
  • Wide IP
    When defining a wide IP, if you have multiple pools in your wide IP, you first specify which load balancing mode to use in selecting the pool in the wide IP. Next, you specify which preferred, alternate, and fallback load balancing modes to use in selecting the virtual server within the selected pool. You can find instructions on how to configure these load balancing modes in the following section, Adding a wide IP .

Understanding wide IPs

After you configure the BIG-IP Controllers, hosts, and the virtual servers they manage, you need to group the configured virtual servers into a wide IP. A wide IP is a mapping of a fully-qualified domain name to a set of virtual servers that host the domain content, such as a web site or an e-commerce site.

Before defining the first wide IP, you should do the following:

  • Gather your BIG-IP Controller and host configuration information so you can easily see which virtual servers have the replicated content. Then you can decide how to group virtual servers into pools.
  • Decide which load balancing modes to use for each pool of virtual servers. If you need to review the available load balancing modes, see Choosing a load balancing mode, on page 2-27 .

Note: NameSurfer, an application included with the 3-DNS Controller, sets up DNS zone files so that wide IP definitions are properly linked to DNS. No action is required on your part, as NameSurfer automatically handles this process. For more information on NameSurfer, see the online help that is included with it (available from the Configuration utility). If you want to manually configure the 3-DNS Controller, see Relating BIND information to 3-DNS Controller wide IP definitions, on page C-10 .

There may be situations (for example, e-commerce and FTP sites) where you need to configure a wide IP so that connections are not sent to a given address unless multiple ports or services are available. You configure this behavior after the wide IP is defined. For details, see Setting up load balancing for services that require multiple ports, on page 6-11 .

Understanding pools

A wide IP contains one or more pool definitions. A pool is a group of virtual servers that the 3-DNS Controller load balances. You can include both types of virtual servers (BIG-IP Controller and host) in a pool definition.

Adding a wide IP

After you determine which virtual servers you should place in which wide IP pools, you are ready to add the first wide IP.

To define a wide IP using the Configuration utility

  1. In the navigation pane, click Wide IPs.
    The Wide IP List screen opens.
  2. On the toolbar, click Add Wide IP.
  3. Add the wide IP settings. For help on defining wide IPs, click Help on the toolbar.
    The wide IP is added to your configuration.

    Repeat this process for each wide IP you want to add.

To manually define a wide IP

  1. At the command prompt, type 3dnsmaint to open the 3-DNS Maintenance menu.
  2. On the 3-DNS Maintenance menu, select Edit 3-DNS Configuration to open the wideip.conf file.
  3. Add a wideip statement.

    Place the wideip statement after all server statements and before any topology statement.

  4. Under the wideip statement, enter the wide IP's address, port, and name information. Enclose the wide IP's name in quotation marks.
  5. Configure any options you want to set (such as the TTL, port list, or QOS coefficients) by entering the appropriate sub-statements.
  6. Define the pool sub-statement. At the minimum, the pool sub-statement should include its name (enclosed in quotation marks) and the virtual servers it contains.
  7. Define the load balancing modes you want to use by entering preferred, alternate, and fallback sub-statements.
  8. Define the IP address, port, and ratio value for each virtual server that you want to include in this pool.

    Figure 5.6 shows the correct syntax for the wideip statement.

    Figure 5.6 Syntax for the wideip statement

     wideip {    
    address <ip_addr>
    port <port_number> | <"service name">
    persist < yes | no >
    persist_ttl <number>
    name <"domain_name">
    [ alias <"alias_name"> ]
    [ ttl <number> ]
    [ port_list <port_number> <port_number> ... ]
    [ qos_coeff {
    rtt <n>
    completion_rate <n>
    packet_rate <n>
    topology <n>
    hops <n>
    vs_capacity <n>
    } ]
    [ pool_lbmode <rr | ratio | ga | random | topology> ]
    pool {
    name <"pool_name">
    [ ratio <pool_ratio> ]
    [ dynamic_ratio < yes | no > ]
    [ rr_ldns < yes | no > ]
    [ preferred < completion_rate | ga | hops | leastconn |
    packet_rate | qos | random | ratio | return_to_dns | rr |
    rtt | topology | null | vs_capacity | static_persist> ]
    [ alternate < ga | null | random | ratio | return_to_dns |
    rr | topology | vs_capacity | static_persist> ]
    [ fallback <completion_rate | ga | hops | leastconn | null |
    packet_rate | qos | random | ratio | return_to_dns | rr |
    rtt | topology | vs_capacity | static_persist> ]
    address <vs_addr>[:<port>] [ratio <weight>]
    }
    }

    Figure 5.7 shows a sample wideip statement. This statement defines a wide IP named mx.wip.domain.com, with an alias of mail.wip.domain.com. The wide IP contains two pools, with pool_1 receiving three times as many requests as pool_2. The 3-DNS Controller attempts to resolve requests sent to pool_1 using the Round Trip Times (RTT) mode. This mode sends connections to the virtual server in the pool that demonstrates the best round trip time between the virtual server and the client LDNS. If the 3-DNS Controller cannot resolve the request using the RTT mode, the controller distributes requests randomly. The 3-DNS Controller distributes requests to the two defined virtual servers in pool_2, at a 2:1 ratio where the first listed virtual server receives twice as many connections as the second.

    Figure 5.7 Example syntax for defining a wide IP

     wideip {    
    address 192.168.102.50
    service "smtp"
    name "mx.wip.domain.com"
    alias "mail.wip.domain.com"
    pool_lbmode ratio
    pool {
    name "pool_1"
    ratio 3
    preferred rtt
    alternate random
    address 192.168.101.50
    address 192.168.102.50
    address 192.168.103.50
    }
    pool {
    name "pool_2"
    ratio 1
    preferred ratio
    address 192.168.104.50 ratio 2
    address 192.168.105.50 ratio 1
    }
    }

Troubleshooting manual configuration problems

Adding a wide IP requires careful planning and use of correct syntax. We have included the following recommendations to make it easier for you to spot and resolve any configuration problems:

  • Configuration utility
    The Configuration utility contains Statistics screens that are useful in diagnosing problems, as they provide a snapshot of your 3-DNS Controller network at any given time. To use them, click the Expand button [ + ] to the left of the Statistics item in the navigation pane, then click either Wide IPs or Summary (and scroll until you see the Wide IP table).
  • wideip.conf syntax
    If you manually configure wide IPs, use the 3dparse utility to verify wideip.conf syntax before you start named. To use this utility, type 3dparse on the command line. For details on the 3dparse utility, see the 3dparse man page. For an example of a wideip.conf file, see Appendix A , Wideip.conf Syntax .
  • /var/log/messages
    If you encounter an error that you cannot trace, you can view the log file in the Configuration utility, or you can directly open the /var/log/messages file on your system. Using the UNIX grep utility, search for "named" (for example, tail -100 /var/log/messages | grep named). This log file saves verbose error information, and should contain an explanation of the error.
  • BIND syntax
    If you are setting up the configuration manually, you may want to refer to one of the following BIND resources for help and background information:
    • Appendix C of this manual
    • The O'Reilly & Associates book, DNS and BIND, 3rd Edition
    • http://www.isc.org/bind.html

Changing global variables that affect load balancing

You can configure global variables that affect how load balancing is handled on a global basis for all wide IPs. You can override these global settings for individual wide IPs as necessary.

Global variables that affect load balancing fall into two categories:

  • Alternate and fallback load balancing modes
  • TTL (time to live) and timer values

    The default settings for these variables are adequate for most configurations. However, if you want to change any global variable, you should refer to the online help or to The globals statement, on page A-7 .

Setting global alternate and fallback modes

You can configure a load balancing mode that all wide IPs can use in the event that their preferred mode fails.

To configure global alternate and fallback load balancing modes using the Configuration utility

  1. In the navigation pane, click System.
    The System - General screen opens.
  2. On the toolbar, click Load Balancing.
  3. In the Default Alternate box, select the load balancing mode to use should a wide IP's preferred mode fail.
  4. In the Default Fallback box, specify the load balancing mode to use should the preferred and alternate modes fail.
    If all modes fail, requests are returned to DNS.
  5. Finish configuring the rest of the settings on the System - Load Balancing screen. (For help on configuring the load balancing settings, click Help on the toolbar.)
    The global load balancing settings are added to your configuration.

To manually configure global alternate and fallback load balancing modes

  1. At the command prompt, type 3dnsmaint to open the 3-DNS Maintenance menu.
  2. On the 3-DNS Maintenance menu, select Edit 3-DNS Configuration to open the wideip.conf file.
  3. Locate or add the globals statement. The globals statement should be at the top of the file.
  4. Use the syntax shown in Figure 5.8 to define global alternate and fallback load balancing modes.

    Figure 5.8 Configuring global alternate and fallback load balancing modes

     globals {    
    [ default_alternate < ga | leastconn | null | packet_rate | random | ratio | return_to_dns | rr | topology | static_persist | vs_capacity > ]
    [ default_fallback < completion_rate | ga | hops | leastconn |
    null | packet_rate | qos | random | ratio | return_to_dns |
    rr | rtt | topology | static_persist | vs_capacity> ]
    }

    Figure 5.9 shows a sample globals statement that defines global load balancing variables.

    Figure 5.9 Sample syntax for setting global load balancing variables

     globals {    
    default_alternate leastconn
    default_fallback rr
    }

Understanding TTL and timer values

Each 3-DNS object has an associated time-to-live (TTL) value. A TTL is the amount of time (measured in seconds) for which metrics information is considered valid. After a timeout is reached, the 3-DNS Controller refreshes the information.

Table 5.2 describes each TTL value, as well as its default setting.

TTL values and default settings
Parameter Description Default
BIG-IP TTL Specifies the number of seconds that the 3-DNS Controller will use BIG-IP Controller metrics information for name resolution and load balancing. 60
Host TTL Specifies the number of seconds that the 3-DNS Controller will use generic host machine metrics information for name resolution and load balancing. 240
3-DNS TTL Specifies the number of seconds that the 3-DNS Controller considers performance data for the other 3-DNS Controllers to be valid. 60
Virtual server TTL Specifies the number of seconds that the 3-DNS Controller will use virtual server information (data acquired from a BIG-IP Controller or other host machine about a virtual server) for name resolution and load balancing. 120
Trace TTL Specifies the number of seconds that the 3-DNS Controller considers traceroute data to be valid. 604800 (seven days)
Path TTL Specifies the number of seconds that the 3-DNS Controller will use path information for name resolution and load balancing. 2400
Default TTL Specifies the default number of seconds that the 3-DNS Controller considers the wide IP A record to be valid. If you do not specify a wide IP TTL value when defining a wide IP, the wide IP definition uses the default_ttl value. 30

Each 3-DNS object also has a timer value. A timer value defines the frequency (measured in seconds) at which the 3-DNS Controller refreshes the metrics information it collects. In most cases, the default values for the TTL and timer parameters are adequate. However, if you make changes to any TTL or timer value, keep in mind that an object's TTL value must be greater than its timer value.

Table 5.3 describes each timer value, as well as its default setting.

Time values and default settings
Parameter Description Default
BIG-IP data refresh Specifies the frequency (in seconds) at which the 3-DNS Controller refreshes BIG-IP Controller information. 20
Host data refresh Specifies the frequency (in seconds) at which the 3-DNS Controller refreshes other host machine information. 90
3-DNS data refresh Specifies the frequency (in seconds) at which the 3-DNS Controller retrieves performance data for other 3-DNS Controllers in the sync group. 20
Virtual server data refresh Specifies the frequency (in seconds) at which the 3-DNS Controller refreshes virtual server information. 30
Trace data refresh Specifies the frequency (in seconds) at which the 3-DNS Controller retrieves traceroute data (traceroutes between each data center and each local DNS). 60
Path data refresh Specifies the frequency (in seconds) at which the 3-DNS Controller refreshes path information (for example, round trip time or ping packet completion rate). 120
Remote nodes query Specifies the frequency (in seconds) at which the 3-DNS Controller queries remote 3-DNS Controllers and BIG-IP Controllers. 60
3-DNS Sync Time Tolerance Specifies the number of seconds that one 3-DNS Controller's time setting is allowed to be out of sync with another 3-DNS Controller's time setting. If the difference between the times on the controllers is higher than the time tolerance setting, the time setting on the controller running behind is reset to match the controller with the most recent time. For example, if the time tolerance is 5 seconds, and one 3-DNS Controller is running 10 seconds ahead of the other, the controller running behind has its time reset to match the one running 10 seconds ahead. If the second controller were running only 2 seconds ahead of the other, the time settings would remain unchanged. Note: If you are using NTP to synchronize the time of the 3-DNS Controller with a time server, select a time tolerance of 0. 10
Timer Sync State Specifies the interval (in seconds) at which the 3-DNS Controller checks to see if it should change states (from principal to receiver or from receiver to principal). The first enabled 3-DNS Controller listed in a sync list is the principal, and the others are receivers. The controller changes states under the following circumstances: if the principal is disabled, the next enabled controller listed in the sync list becomes the principal. When the original principal becomes enabled, it once again becomes principal, and the temporary principal returns to a receiver state. 30
Persist Cache Specifies the interval (in seconds) at which the 3-DNS Controller discards the paths and other metrics data. 300

To configure global TTL and timer values using the Configuration utility

  1. In the navigation pane, click System.
    The System - General screen opens.
  2. To configure the default TTL for wide IPs, type a new value in the Default TTL box.
  3. To configure other TTL and timer values, click Timers and Task Intervals on the toolbar.
    The System - Timers & Task Intervals screen opens.
  4. Add the TTL and timer values settings. For help on configuring the TTL and timer values settings, click Help on the toolbar.

To manually configure global TTL and timer values

  1. At the command prompt, type 3dnsmaint to open the 3-DNS Maintenance menu.
  2. On the 3-DNS Maintenance menu, select Edit 3-DNS Configuration to open the wideip.conf file.
  3. Locate or add the globals statement. The globals statement should be at the top of the file.
  4. Use the syntax shown in Figure 5.10 to define global TTL and timer values.

    Figure 5.10 Syntax for configuring global TTL and timer values

     globals {     
    [ timer_get_3dns_data <number> ]
    [ timer_get_bigip_data <number> ]
    [ timer_get_host_data <number> ]
    [ timer_get_vs_data <number> ]
    [ timer_get_path_data <number> ]
    [ timer_get_trace_data <number> ]
    [ timer_check_keep_alive <number> ]
    [ timer_check_pending_q_timeouts <number> ]
    [ timer_persist_cache <number> ]
    [ timer_sync_state <number> ]
    [ 3dns_ttl <number> ]
    [ bigip_ttl <number> ]
    [ host_ttl <number> ]
    [ vs_ttl <number> ]
    [ path_ttl <number> ]
    [ trace_ttl <number> ]
    [ default_ttl <number> ]
    }