Sunday, May 29, 2011

Load Balancing With A F5 GTM

Understanding load balancing on the Global Traffic Manager

When the Global Traffic Manager receives a name resolution request, the system employs a load balancing mode to determine the best available virtual server. Once the Global Traffic Manager identifies the virtual server, it constructs a DNS answer and sends that answer back to the requesting client's local DNS server. The DNS answer, or resource record, can be either an A record that contains the IP address of the virtual server, or a CNAME record that contains the canonical name for a DNS zone.
Within the Global Traffic Manager, you have two categories of load balancing modes from which to select: static and dynamic. A static load balancing mode selects a virtual server based on a pre-defined pattern. A dynamic load balancing mode selects a virtual server based on current performance metrics.
The Global Traffic Manager provides tiered load balancing system. A tiered load balancing system is a load balancing system that occurs at more than one point during the resolution process. The tiers within the Global Traffic Manager are as follows:
  • Wide IP-level load balancingWide IPs that contain two or more pools use a load balancing mode first to select a pool. Once the Global Traffic Manager selects a pool, the system then uses pool-level load balancing mode to choose a virtual server within the selected pool. If the Global Traffic Manager does not choose a virtual server in the first pool, it applies the load balancing mode to the next pool, either until it selects the best virtual server to respond to the request, or all the pools are tried.
  • Pool-level load balancingA pool contains one or more virtual servers. After the Global Traffic Manager uses wide IP-level load balancing to select the best available pool, it uses a pool-level load balancing to select a virtual server within that pool. If the first virtual server within the pool is unavailable, the Global Traffic Manager selects the next best virtual server based on the load balancing mode assigned to that pool.
For each pool that you manage, the Global Traffic Manager supports three types of load balancing methods: preferred, alternate, and fallback. The preferred load balancing method is the load balancing mode that the system will attempt to use first. If the preferred method fails to provide a valid resource, the system uses the alternate load balancing method. Should the alternate load balancing method also fail to provide a valid resource, the system uses the fallback method.
One of the key differences between the alternate methods and the other two load balancing methods is that only static load balancing modes are available from the alternate load balancing list. This limitation exists because dynamic load balancing modes, by definition, rely on metrics collected from different resources. If the preferred load balancing mode does not return a valid resource, it is highly likely that the Global Traffic Manager was unable to acquire the proper metrics to perform the load balancing operation. By limiting the alternate load balancing options to static methods only, the Global Traffic Manager can better ensure that, should the preferred method prove unsuccessful, the alternate method will return a valid result.

F5 GTM Topologies Load Balancing

Topologies are a way to load balance to a specific pool dependent on were the traffic comes from or is going.


This requires a topology record for the GTM, so that it knows how to handle DNS requests. This is made up of 3 parts. the Request Source, the Destination Source and Weight.




The reuqest source defines where the DNS request came from. the can use 




  • A continent


  • A country (based on the ISO 3166 top-level domain codes)


  • An IP subnet (CIDR definition)


  • An Internet Service Provider (ISP)


  • A custom region


  • The destination defines the resource to which the GTM will direct the DNS request too.

    • A continent
    • A country (based on the ISO 3166 top-level domain codes)
    • A data center
    • An IP subnet (CDIR definition)
    • An Internet Service Provider (ISP)
    • A pool of virtual servers
    • A custom region

      The last element of a topology record, called the topology score or weight, allows the Global Traffic Manager to evaluate the best resolution option for a DNS request. In the event that a name resolution request matches more than one topology record, the Global Traffic Manager uses the record with the highest weight attribute to determine which statement it uses to load balance the request

        To set up a topology record

        1. On the Main tab of the navigation pane, expand Global Traffic and then click Topology.
          The main screen for topologies opens.
        2. Click the Create button.
          The New Record screen opens.
        3. To create a request source statement, use the request resource settings:
          1. Select an origin type from the corresponding list.
          2. Select an operator, either is or is not.
          3. Define the criteria for the request source statement. For example, if the statement focuses on a country, a list appears from which you select the country. If the statement focuses on an IP subnet, a box appears that allows you to define that subnet.
        4. To create a destination statement, use the destination settings:
          1. Select a destination type from the corresponding list.
          2. Select an operator, either is or is not.
          3. Define the criteria for the destination statement. For example, if the statement focuses on a country, a list would appear from which you select the country. If the statement focuses on an IP subnet, a box appears that allows you to define that subnet.
        5. In the Weight box, specify the priority this record has over topology records.
        6. Click the Create button to save the new topology.


        Using topology load balancing in a wide IP

        You can use the Topology load balancing mode to distribute traffic among the pools in a wide IP. To do this, you must have at least two pools configured in the wide IP. With topology load balancing, you send name resolution requests to specific data centers or other resources based on the origin of the request.

        To configure a wide IP to use topology load balancing

        1. On the Main tab of the navigation pane, expand Global Traffic and then click Wide IPs.
          The Wide IPs screen opens.
        2. Click the name of the wide IP for which you want to assign topology-based load balancing.
          The properties screen for the wide IP opens.
        3. On the menu bar, click Pools.
          The pools screen opens. This screen contains a list of the pools currently assigned to the wide IP.
        4. From the Load Balancing Method list, select Topology.
        5. Click the Update button to save your changes.
        Repeat this process for each wide IP as needed.