Applies To:

Show Versions Show Versions

Manual Chapter: BIG-IP® version 9.4 Global Traffic Manager and Link Controller Implementations Guide: 7 - Cost-Based Load Balancing
Manual Chapter
Table of Contents   |   << Previous Chapter   |   Next Chapter >>


7

Cost-Based Load Balancing


Introducing cost-based load balancing

The Link Controller provides a variety of methods for managing the traffic flowing in and out of a network. A common method is cost-based load balancing. In cost-based load balancing, you prioritize link usage based on the cost of the bandwidth for that connection to the Internet. The Link Controller sends traffic to the link that is currently operating at the lowest cost. As the usage cost for each link changes, the Link Controller dynamically shifts traffic to the best link.

When configuring a Link Controller to use cost-based load balancing, there are three critical settings:

  • Weighting
    The Weighting option for each link determines how the Link Controller prioritizes the links in its configuration. By default, this option is set to Ratio, which is applicable for both ratio load balancing and bandwidth load balancing. For cost-based load balancing, however, you must set this option to Price (Dynamic Ratio).
  • Prepaid Segment
    Most Internet Service Providers (ISPs) offer bandwidth plans that include a prepaid amount of bandwidth. In the Prepaid Segment option, you assign the appropriate bandwidth and cost values that are prepaid for the link.
  • Incremental Segments
    The Incremental Segment option allows you to define the cost per segment values that apply to this link. You can assign as many incremental segments as needed.
Note

When implementing cost-based load balancing, it is important that your configuration applies to all of the links that the Link Controller manages. We do not recommend applying cost-based load balancing to one set of links and ratio load balancing to another set, for example.

 

 

Figure 7.1 Cost-based Load Balancing

In this process, shown in Figure 7.1 , the following sequence occurs:

  1. A client sends a DNS request to a Local DNS server.
  2. The LDNS server sends an iterative request that leads to the Link Controller.
  3. The Link Controller determines the best link based on current cost estimates and bandwidth usage, and sends the appropriate response back to the LDNS server.
  4. The LDNS server forwards the response to the client.
  5. The client then communicates with the appropriate virtual server through the corresponding link that the Link Controller specified.

Configuring cost-based load balancing

To illustrate how cost-based load balancing works, consider the fictional company SiteRequest. This company has two links for managing its inbound and outbound traffic:

  • Link Alpha, which is the primary link for the network. This link uses an ISP to which a flat fee of $45 is paid for up to 4Mbps of total (both inbound and outbound) traffic. If the limit of 4Mbps is exceeded, SiteRequest incurs a $2/Mbps charge.
  • Link Beta, which is a secondary link for the network. This link uses an ISP with which SiteRequest does not have a prepaid amount of bandwidth. Instead, SiteRequest is billed based on a pay-as-you-go basis. The rate charged for using this link is set at $1/Mbps.

As these rates illustrate, the most cost-efficient configuration for SiteRequest's links is to have Link Alpha handle traffic until it reaches 4Mbps, then send any traffic over 4Mbps to Link Beta. When the traffic decreases, the Link Controller must switch back to using only Link Alpha again.

Table 7.1 provides additional information about each link.

Table 7.1 Additional link attributes
Link
Router Address
Uplink Address
ISP
Link Alpha
192.168.5.5
192.168.5.6
Global ISP
Link Beta
192.168.10.5
192.168.10.6
Regional ISP

 

The tasks required to configure cost-based load-balancing include:

  • Configure the links
  • Create a default gateway pool
  • Implement the default gateway pool
  • Configure the virtual servers
  • Add a wide IP

Configuring the links

The first step in designing a Link Controller configuration that uses cost-based load balancing to manage outbound traffic is to add and configure the links into the Link Controller. You can configure each link using a variety of options; however, the critical settings are the Weighting, Prepaid Segment, and Incremental Segment options, with which you set the pricing values for the link.

Note

The following steps apply to the Link Controller system; however you can also use these steps if you have a Global Traffic Manager. If you are configuring links on a Global Traffic Manager, you must first create a data center, to which you then assign the configured link.

To add the first link

  1. On the Main tab of the navigation pane, expand Link Controller and then click Links.
    The main link screen opens.
  2. Click the Create button.
    The New Link screen opens.
  3. In the Name box, type the name of the link.
    In this example, type Link Alpha.
  4. In the Router Address box, type the IP address of the router.
    For this example, type 192.168.5.5.
  5. In the Uplink Address box, type the IP address that corresponds with the external Internet connection.
    In this example, type 192.168.5.6.
  6. In the Service Provider box, type the name of the ISP provider.
    For this example, select Global ISP.
  7. From the Configuration list, select Advanced.
    An additional set of configuration options open.
  8. From the Weighting list, select Price (Dynamic Ratio).
    The Prepaid Segment and Increment Segment options open.
  9. In the Prepaid Segment option, type the amount of bandwidth is prepaid for the link. This value is in bytes.
    In this example, type 4000.
  10. In the Incremental Segment option, add the incremental segment price.
    In this example type the following entry:
    Up to 1000 bps at 2 $/Mbps
  11. Click the Create button to save your changes.

You can now repeat these steps to add the second link to the configuration. In this example, when you add the second link, set the Prepaid Segment to 0 and add the following entry in the Incremental Segment option:

Up to 1000 bps at 1 $/Mbps

Creating the default gateway pool for cost-based load balancing

After you have added and configured the relevant links, the next step in implementing cost-based load balancing is to create the default gateway pool that will load balance the traffic across the links.

To create a default gateway pool for cost-based load balancing

  1. On the Main tab of the navigation pane, expand Local Traffic and then click Pools.
    The main Pools screen appears.
  2. Click the Create button.
    The create pool screen appears.
  3. In the Name box, type the name of the pool.
    In this example, type default_gateway_pool.
  4. For the New Members setting, add the IP addresses associated with each link.
    In this example type the following:
    • For Link Alpha, add 192.168.5.5
    • For Link Beta, add 192.168.10.5
  5. Click Finished to save your changes.

Implementing the default gateway pool for cost-based load balancing

After you create a default gateway pool, you must instruct the Link Controller to use the pool as the default gateway connection between the internal network and the Internet.

To implement the default gateway pool for cost-based load balancing

  1. On the Main tab of the navigation pane, expand Network and then click Routes.
    The main routes screen opens.
  2. Click the Add button.
    The New Routes page opens.
  3. From the Type list, select Default Gateway.
  4. From the Resource list, select Use Pool.
    A list appears, allowing you to select the pool of links.
  5. Select default_gateway_pool.
  6. Click Finished to save your changes.

Configuring the virtual servers

After creating the pools, you configure the virtual servers, one for each link that load balances inbound connections across the servers. You also configure one wildcard virtual server to load balance outbound connections across the routers.

For this solution, you define the following virtual servers:

  • VS for Link Alpha 1, which has an IP address of 10.10.5.5:80 and represents a single host on the network.
  • VS for Link Alpha 2, which has an IP address of 10.10.5.6:80 and represents a single host on the network.
  • VS for Link Beta 1, which has an IP address of 10.10.10.5:80 and also represents a single host on the network.
  • VS for Link Beta 2, which has an IP address of 10.10.10.6:80 and also represents a single host on the network.

To add a virtual server for cost-based load balancing

  1. On the Main tab of the navigation pane, expand Local Traffic and then click Virtual Servers.
    The main screen for virtual servers appears.
  2. Click the Create button.
    The New Virtual Server screen opens.
  3. In the Name box, type the name of the virtual server.
    In this example, type VS for Link Alpha 1.
  4. In the Destination section, select Host.
  5. In the Service Port option, type 80.
  6. Click the Finished button to save the new virtual server configuration.

You then repeat the preceding steps for the additional virtual servers. Once the remaining virtual servers are in the configuration, you can define the wildcard virtual server.

To define a wildcard virtual server for cost-based load balancing

  1. On the Main tab of the navigation pane, expand Local Traffic and then click Virtual Servers.
    The main screen for virtual servers appears.
  2. Click the Create button.
    The New Virtual Server screen opens.
  3. For a wildcard virtual server, use the following settings for this example:
    • `For the name, type outbound.
    • For the destination address, type 0.0.0.0.
    • For the service, type 0 or select any from the list.
  4. Click the Finished button to apply your changes.

Adding a wide IP for inbound load balancing

To complete the link load balancing configuration, you must configure a wide IP for each pair of virtual servers you created for each link. Each wide IP in the configuration has a set of virtual servers to which the Link Controller load balances incoming DNS requests. The wide IP is made up of only virtual servers that the Link Controller manages. When you configure the wide IP, you also specify the load balancing methods that the Link Controller applies to the incoming DNS requests.

For this solution, you will use the wide IP www.siterequest.com, using the Global Availability as the preferred load balancing method, and None for the Alternate and Fallback methods.

To add a wide IP

  1. On the Main tab of the navigation pane, expand Link Controller and then click Inbound Wide IPs.
    The main wide IP screen opens.
  2. Click the Create button.
    The New Wide IP screen opens.
  3. In the Name box, type the name of the wide IP
    In this example, type www.siterequest.com.
  4. From the Load Balancing setting:
    • Select Ratio from the Preferred list.
    • Select Round Robin from the Alternate list.
    • Select Return to DNS from the Fallback list.
  5. In the Virtual Server setting, add the virtual servers that you created in the previous Configuring the virtual servers .
  6. Click the Finished button to save the new wide IP.

At this point, you now have a Link Controller configured to manage DNS traffic for www.siterequest.com. As data flows in and out of the network, the Link Controller monitors the total amount of bandwidth for each link. While traffic remains below 4Mbps, the Link Controller uses Link Alpha. If traffic exceeds that amount, the Link Controller sends the overflow traffic to Link Beta. And, should a link go offline for any reason, the Link Controller uses the Alternate and Fallback load balancing modes to route traffic through an available link.




Table of Contents   |   << Previous Chapter   |   Next Chapter >>

Was this resource helpful in solving your issue?




NOTE: Please do not provide personal information.



Incorrect answer. Please try again: Please enter the words to the right: Please enter the numbers you hear:

Additional Comments (optional)