Applies To:
Show Versions![Show Versions](/etc/designs/pcx/techdocs/images/expandversions.gif)
3-DNS Controller versions 1.x - 4.x
- 2.0.1 PTF-01, 2.0.1, 2.0.0
5
Configuring Basic Load Balancing
- Getting started with load balancing
- Defining a wide IP
- Changing global variables that affect load balancing
Getting started with load balancing
The third and final phase of installing 3DNS Controllers is to configure load balancing. The 3DNS Controller uses the load balancing modes you configure to determine how to handle DNS name resolution requests. Name resolution requests are sent from a local DNS and are ultimately resolved by a virtual server. The virtual server is managed by a BIG/ip Controller or host, and the BIG/ip Controller or host is managed by the 3DNS Controller.
This chapter describes how to configure load balancing. Follow the procedures in this chapter to configure any load balancing mode. If you want to implement more advanced load balancing modes, see Chapter 6 , Configuring Specialized Load Balancing .
You can configure load balancing at the wide IP and global levels:
- Wide IP
Most load balancing configuration takes place at the wide IP level, which means that each pool of virtual servers, contained in a wide IP definition, uses the specified load balancing mode. You define which load balancing modes to use when you define the wide IP. See Defining a wide IP , in the following section. You can actually set up to three load balancing modes for each pool: a preferred mode, and two modes to use in case the preferred mode fails. - Global
At the global level, you can set default alternate and default fallback modes. If you don't configure alternate or fallback modes within a wide IP definition, the 3DNS Controller uses the global alternate and fallback modes. Configuring global alternate and fallback modes is described on page 5 -10 .
Defining a wide IP
After you configure 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 that 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-26.
Note: NameSurfer, an application included with the 3DNS 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 F5 Configuration utility). If you do not want to configure the 3DNS Controller manually, see Relating BIND information to 3DNS Controller wide IP definitions , on page C -10 .
There may be situations (for example, for 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-10.
Understanding pools
A wide IP contains one or more pool definitions. A pool is a group of virtual servers that the 3DNS Controller load balances. You can include both types (BIG/ip Controller and host) of virtual servers in a pool definition.
Note: At this time the F5 Configuration utility does not support using more than two pools for load balancing. Also, you cannot configure the names of pools using the Configuration utility. If your wideip.conf file includes multiple pools, do not use the F5 Configuration utility.
Adding a wide IP
After determine which virtual servers belong in which wide IP pools, you are ready to add the first wide IP. If you want to configure a wide IP for a domain that has one registered alias name, you can use the Configuration utility as described below. To configure wide IPs that have multiple aliases, you must configure the wide IP manually, as described on page 5 -5 .
To define a wide IP using the F5 Configuration utility
- In the navigation pane, click Wide IPs.
The Wide IP List screen opens. - On the toolbar, click Add Wide IP.
- In the Wide IP Name box, type a name for the wide IP.
- In the Wide IP Alias box, type a domain name alias only if the domain has a registered alias name.
- In the Wide IP Address box, type the IP address of the wide IP.
- In the Wide IP Port box, type a port number or select a service from the list.
- If you want to use a TTL other than the default (as specified on the System - Timers & Task Intervals screen), type a new TTL value in the Wide IP TTL box. Specifying a new value here overrides the global default value only for this wide IP. It overrides the TTL in the resource record.
- In the Select Virtual Server Type box, check one of the following: VSb if the pool contains virtual servers that run on BIG/ip Controllers, or VSh if the pool contains virtual servers that run on hosts.
- Click Next.
The Configure Load Balancing screen opens. - If you are setting up two pools that use Ratio mode, type the ratio weight for the pool in the Pool Ratio box.
- In the Preferred box, select the load balancing mode to use for this wide IP. The default is Round Robin.
- If you want to use an alternate method other than the default (as specified on the System - Load Balancing screen), select the load balancing mode to use if the Preferred mode fails in the Alternate box. The default is Round Robin.
- If you want to use a fallback method other than the default (as specified on the System - Load Balancing screen), select the load balancing mode to use if the Preferred and Alternate modes fail. The default is Return to DNS.
- If you want to use the Round Robin LDNS feature, check Use Round Robin LDNS. When you turn on Round Robin LDNS, the 3DNS Controller returns a list of available virtual servers available for load balancing to a client and stores the list in the browser cache. If you check this option, also enter the maximum number of virtual servers that the 3DNS Controller should return in the Round Robin LDNS Limit box. The default, 0, specifies that the 3DNS Controller returns the IP addresses of all (up to 16) available virtual servers.
- If you want to use the Dynamic Ratio option, check Use Dynamic Ratio. This option is relevant only if you are using the Round Trip Time, Completion Rate, Hops, or Quality of Service mode. When you turn on Dynamic Ratio, the 3DNS Controller treats Quality of Service (QOS) scores as ratios, and it uses each server in proportion to the ratio determined by the QOS calculation. For more information, see Using the Dynamic Ratio option , on page 6-6.
- If you selected Quality of Service (QOS) as the Preferred or Fallback mode, you can use the Quality of Service group to fine-tune the QOS coefficients. Before doing so, we recommend that you read Understanding QOS coefficients , on page 6-2.
- Click Next.
The Select Virtual Servers screen opens. - From the list, select the virtual servers you want to add to this wide IP's pool.
- If you selected ratio as a load balancing mode, assign a ratio value to each virtual server in the Ratio column.
- If you selected global availability as a load balancing mode, rank the virtual servers in descending order of preference in the Order column.
Global availability is a specialized mode. For more information, see Setting up Global Availability mode , on page 6-8. - Click Finish.
The wide IP is added to your configuration. Repeat this process for each wide IP you want to add.
To define a wide IP manually
- On the 3DNS Maintenance menu, select Edit 3DNS Configuration to open the wideip.conf file.
- Add a wideip statement.
Place the wideip statement after all server statements and before any topology statement.
- Under the wideip statement, enter the wide IP's address, port, and name information. Enclose the wide IP's name in quotation marks.
- Configure any options you want to set (such as the TTL, port list, or QOS coefficients) by entering the appropriate sub-statements.
- 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.
- Define the load balancing modes you want to use by entering preferred, alternate, and fallback sub-statements.
- Define the IP address, port, and ratio value for each virtual server that you want to include in this pool.
Figure 5.1 shows the correct syntax for the wideip statement:
wideip {
address <ip_addr>
port <port_number> | <"service name">
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>
} ]
[ pool_lbmode <rr | ratio | ga | random> ]
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 > ]
[ alternate < ga | null | random | ratio | return_to_dns |
rr | topology > ]
[ fallback <completion_rate | ga | hops | leastconn | null |
packet_rate | qos | random | ratio | return_to_dns | rr |
rtt | topology > ]
address <vs_addr>[:<port>] [ratio <weight>]
}
}Figure 5.1 Syntax for the wideip statement
Figure 5.2 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 3DNS Controller attempts to resolve requests sent to pool_1 using the Round Trip Times (RTT) method. This method 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 3DNS Controller cannot resolve the request using the RTT mode, the controller distributes requests randomly. The 3DNS Controller distributes requests to pool_2 to the two defined virtual servers, at a 2:1 ratio where the first listed virtual server receives twice as many connections as the second.
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 is a process that requires careful planning and use of correct syntax. The following recommendations are intended to make it easier for you to spot and resolve any configuration problems:
- F5 Configuration utility
The F5 Configuration utility contains a Statistics area that is useful in diagnosing problems, as it provides a snapshot of your 3DNS Controller network at any given time. To use it, click Statistics in the left pane of the F5 Configuration utility, then click either Summary (and scroll until you see the Wide IP table) or Wide IPs. - 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 page B -1 . 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, 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 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-6.
Setting global alternate and fallback modes
You can decide which load balancing modes to use for all wide IPs in the event that a wide IP's preferred mode fails.
To configure global alternate and fallback load balancing modes using the F5 Configuration utility
- In the navigation pane, click System.
The System - General screen opens. - On the toolbar, click Load Balancing.
- In the Default Alternate box, specify the load balancing mode to use should a wide IP's preferred mode fails.
- 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.
To configure global alternate and fallback load balancing modes manually
- On the 3DNS Maintenance menu, select Edit 3DNS Configuration to open the wideip.conf file.
- Locate or add the globals statement. The globals statement should be at the top of the file.
- Use the syntax shown in Figure 5.3 to define global alternate and fallback load balancing modes.
globals {
[ default_alternate < ga | null | random | ratio |
return_to_dns | rr | topology > ]
[ default_fallback < completion_rate | ga | hops | leastconn |
null | packet_rate | qos | random | ratio | return_to_dns |
rr | rtt | topology > ]
}Figure 5.3 Configuring global alternate and fallback load balancing modes
Figure 5.4 shows a sample globals statement that defines global load balancing variables:
globals {
default_alternate leastconn
default_fallback rr
}Figure 5.4 Sample syntax for setting global load balancing variables
Understanding TTL and timer values
Each 3DNS 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 3DNS Controller refreshes the information.
Table 5.1 describes each TTL value, as well as its default setting.
Each 3DNS object also has a timer value. A timer value defines the frequency (measured in seconds) at which the 3DNS 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.2 describes each timer value, as well as its default setting.
To configure global TTL and timer values using the F5 Configuration utility
- In the navigation pane, click System.
The System - General screen opens. - If you want to configure the default TTL for wide IPs, enter a new value in the Default TTL box.
- To configure other TTL and timer values, click Timers & Task Intervals on the toolbar.
The System - Timers & Task Intervals screen opens. - Make any edits you need to make in the appropriate boxes, and click Update.
To configure global TTL and timer values manually
- On the 3DNS Maintenance menu, select Edit 3DNS Configuration to open the wideip.conf file.
- Locate or add the globals statement. The globals statement should be at the top of the file.
- Use the syntax shown in Figure 5.5 to define 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> ]
[ 3dns_ttl <number> ]
[ bigip_ttl <number> ]
[ host_ttl <number> ]
[ vs_ttl <number> ]
[ path_ttl <number> ]
[ trace_ttl <number> ]
[ default_ttl <number> ]
}Figure 5.5 Syntax for configuring global TTL and timer values