Manual Chapter : 3-DNS Reference Manual v4.5.10: Topology

Applies To:

Show Versions Show Versions

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

  • 4.5.14, 4.5.13, 4.5.12, 4.5.11, 4.5.10
Manual Chapter


3

 

Topology


Working with Topology load balancing

To use the Topology load balancing mode, you first set up topology records in a topology statement. Once you have defined a topology statement, you can set up Topology load balancing among pools in a wide IP, or within a pool. Note that if you do not create a topology statement, and you configure Topology as the load balancing mode, the 3-DNS Controller load balances requests using the Random mode.

The crypto 3-DNS includes a database that maps IP addresses to geographic locations. With this database, the system can use the geographic attributes of local DNS servers (LDNS) to direct traffic.

The following sections describe how to create a topology statement, and how to set up Topology load balancing.

Note


Topology is also a coefficient in the QOS equation. If you have configured a Topology statement, the topology coefficient is calculated in the QOS score. For more information on the QOS equation and the QOS score, see the 3-DNS Administrator Guide, Chapter 9, Working with Quality of Service .

 

Setting up topology records

A topology record has three elements: an LDNS location endpoint, a virtual server location endpoint, and a relative weight. The location endpoints can be one of the following:

  • A IP subnet (CIDR definition)

  • A wide IP pool (managed by the 3-DNS Controller)

  • A data center (managed by the 3-DNS Controller)

  • A country (based on the ISO 3166 top-level domain codes, as specified by IANA, the Internet Assigned Numbers Authority)

  • A continent

  • An Internet service provider (ISP) (for LDNS location endpoints only)

  • A user-defined region

The relative weight, or topology score, for the topology record allows the 3-DNS Controller to evaluate the best resolution option for a DNS request. The not (!) operator, when used in a topology record, indicates location endpoints not equal to the specified value.

Note


Note that the topology score is a value in a range that you decide, depending on the specifics of your load balancing requirements. If two records receive a score because they match the LDNS location information, the 3-DNS Controller uses the record with the higher score.

 

A topology statement is composed of one or more topology records. Figure 3.1 is an example of a topology statement, with two topology records, as it appears in the Configuration utility.

Figure 3.1 Example of a topology statement in the Configuration utility

Here is an explanation of how to interpret the topology statement in Figure 3.1 . A wide IP pool labeled origin manages the virtual servers that are returned for DNS resolution requests sent by local DNS servers located in North America. A wide IP pool labeled cache_farm manages the virtual servers that are returned for DNS resolution requests sent by local DNS servers located anywhere except North America.

For example, the 3-DNS Controller receives a DNS resolution request from an LDNS located in North America. The controller evaluates the LDNS location criteria in the request against the first topology record and assigns a weight of 1000 to the record, because the location information matches. (The local DNS server is in North America.) The controller then evaluates the request against the next topology record, and assigns a score of 0 to that record because the LDNS location information does not match.

Once the controller evaluates the request against all of the topology records, it sends the request to the wide IP, pool, or subnet specified in the topology record that has the highest weight (or score). For our example, the controller routes the DNS request to the wide IP pool origin for resolution, because that topology record has the highest score.

     

To add topology records using the Configuration utility

  1. In the navigation pane, click Topology.
    The Manage Topology Records screen opens.

  2. Add the settings for the topology records, and click Add. For assistance with the settings on this screen, click Help on the toolbar.

To remove topology records using the Configuration utility

  1. In the navigation pane, click Topology.
    The Manage Topology Records screen opens.

  2. Select the topology record that you want to remove from the Current Topology Records list, and click Remove.
    The topology record is removed from the topology statement. For assistance with the settings on this screen, click Help on the toolbar.


Using the Topology load balancing mode in a wide IP

You can use the Topology load balancing mode to distribute traffic among wide IP pools. You must have at least two pools configured in the wide IP. You can use the Topology load balancing mode with pools to direct traffic to a specific data center in your network, to a third-party network, or to a content delivery network.

To set up topology to distribute traffic among wide IP pools using the Configuration utility

  1. In the navigation pane, click Wide IPs.
    The Wide IP List screen opens.

  2. In the Wide IP column, click a wide IP name.
    The Modify Wide IP screen opens.

  3. In the Pool LB Mode box, select Topology as the load balancing mode for the wide IP.

  4. Click Update.

To set up topology to distribute traffic among wide IP pools from the command line

  1. Type the following command to ensure that the configuration files contain the same information as the memory cache.

    3ndc dumpdb

  2. Open the wideip.conf file in a text editor (either vi or pico).

  3. Locate the wideip statement that you want to edit.

  4. Define the pool load balancing mode as Topology.

    pool_lbmode topology

  5. Save and close the file.

  6. Commit the changes to the configuration by typing:

    3ndc reload

Figure 3.2 shows a sample wide IP definition where Topology is the load balancing mode among the pools in this wide IP configuration.

Figure 3.2 Example syntax for Topology pool load balancing in a wide IP


wideip {
  address 192.168.44.1
  name "www.siterequest.com"
  port 80
   pool_lbmode topology

  pool {
    name "cache_farm"
    fallback null
    address 192.168.44.10
    address 192.168.44.20
  }

  pool {
    name "origin"
    address 172.168.11.10
    address 172.168.11.20
  }
}
 


Using the Topology load balancing mode in a pool

In addition to setting up the Topology load balancing mode to select a pool within a wide IP, you can also set up the Topology load balancing mode to select a virtual server within a pool. However, you must configure the topology records before the 3-DNS Controller can use the Topology load balancing mode within a pool. If you have no topology records in the topology statement, Topology does not appear, in the Configuration utility, as an option for the Preferred, Alternate, or Fallback load balancing modes for pools.

To set up topology load balancing within a pool using the Configuration utility

  1. In the navigation pane, click Wide IPs.
    The Wide IP List screen opens.

  2. In the Pools column, click a pool.
    The Modify Wide IP Pools screen opens.

  3. In the Pool Name column, click a pool name.
    The Modify Load Balancing for [pool name] screen opens.

  4. In the Preferred box, select Topology as the load balancing mode for the pool.

  5. Click Update.
    The change is added to the configuration.

To set up topology load balancing in a pool from the command line

  1. Type the following command to ensure that the configuration files contain the same information as the memory cache.

    3ndc dumpdb

  2. Open the wideip.conf file in a text editor (either vi or pico).

  3. Locate the wideip statement you want to edit.

  4. Define the preferred, alternate, or fallback load balancing mode for the pool as Topology. The example in Figure 3.3 , shows a sample wide IP definition where topology is the preferred load balancing mode within a pool.

  5. Save and close the file.

  6. Commit the changes to the configuration by typing:

    3ndc reload

Figure 3.3 Example of Topology load balancing mode within a pool


wideip {
  address 192.168.103.60
  port 80
  name "ntp.wip.siterequest.com"
  pool {
    name "poolA"
    preferred topology
    alternate rtt
    address 192.168.101.60 // New York
    address 192.168.102.60 // Los Angeles
    address 192.168.103.60 // Tokyo
  }
}
 

Understanding user-defined regions

To further refine the topology load balancing capabilities of the 3-DNS Controller, you can create custom topology regions. By adding user-defined regions to the topology statement, the 3-DNS Controller can route traffic (client requests) to the best data center or wide IP based on the characteristics of your specific network.

You create a custom region by adding one or more region member types to the region member list. The region member types are: Continent, Country, Data Center, IP Subnet, ISP, User-Defined Region, and Wide IP Pool. Once you select a region member type, you then fill in the details about that region member and add it to the region member list. The region member options change based on the region member type that you select. When you have finished adding region members to your new region, the new region becomes an option on the Manage Topology screen, in the Server and LDNS boxes.

To create a user-defined region using the Configuration utility

  1. In the navigation pane, click Topology.
    The Manage Topology screen opens.

  2. On the toolbar, click Manage User-Defined Regions.
    The Region List screen opens.

  3. On the toolbar; click Add Region.
    The User-Defined Region screen opens.

  4. On the User-Defined Region screen, add the settings you want for your custom region. For information on the specific settings, click Help on the toolbar.

To create a user-defined region from the command line.

  1. Type the following command to ensure that the configuration files contain the same information as the memory cache.

    3ndc dumpdb

  2. Open the wideip.conf file in a text editor (either vi or pico).

  3. Add the user-defined region. You can use the syntax shown in Figure 3.4 , as an example.

  4. Save and close the file.

  5. Commit the changes to the configuration by typing:

    3ndc reload

Figure 3.4 Syntax for user-defined regions


rdb user {
  region {
    name "US_no_AOL_or_STUFF"
    cont."North America"
    ! country."MX"
    ! country."CA"
    ! ISP."AOL"
   }
}

Working with the topology statement in the wideip.conf file

The topology statement, in the wideip.conf file, can include the following variables to specify pools, data centers, continents, countries, and user-defined regions, in addition to the traditional CIDR blocks, for both servers and local DNS servers.

 

 

Variable

Description

pool.<"pool_name">

Specifies a wide-IP pool for load balancing. Note that pool names can be duplicated across wide IPs. The name must be in quotation marks. Use this for server in a topology record.

datacenter.<"datacenter_name">

Specifies a data center for load balancing. The name must be in quotation marks. Use this for server in a topology record.

continent.<"continent_name">

Specifies one of the continents for load balancing: "North America", "South America", "Europe", "Asia", "Australia", "Africa", or "Antarctica". The name must be in quotation marks. Use this for ldns in a topology record.

country.<"2-letter_code">

Specifies a country for load balancing using one of the two-letter country codes found in the file /usr/local/3dns/include/net.ccdb. The name must be in quotation marks. Use this for ldns in a topology record.

isp."AOL"

For local DNS servers only, specifies the Internet service provider, America Online (AOL). The name must be in quotation marks.

user.<"region_name">

Specifies a user-defined region. The name must be in quotation marks.

!

The not ( ! ) operator negates the meaning of an element in a topology record.

score

Specifies the relative weight, or score, for the topology record, which allows the 3-DNS Controller to evaluate the best resolution option for a DNS request.

 

 

To add a topology statement to the include file /config/3dns/include/topology.inc, follow the format of the example in Figure 3.5 .

Figure 3.5 Example of a topology statement


topology {

// server ldns score
pool."origin" cont."North America" 100
pool."cache_farm" !cont."North America" 100
datacenter"dc_1" user."Europe" 300
pool."origin" user."headquarters" 200
}

Note


Use the not (!) notation in a topology statement to negate the meaning of an element, as shown in Figure 3.5 .