# Patent

## Title
Configurable geographic prefixes for global server load balancing

## Abstract

In a load balancing system, user-configurable geographic prefixes are provided. IP address prefix allocations provided by the Internet Assigned Numbers Authority (IANA) and associated geographic locations are stored in a first, static database in a load balancing switch, along with other possible default geographic location settings. A second, non-static database stores user-configured geographic settings. In particular, the second database stores Internet Protocol (IP) address prefixes and user-specified geographic regions for those prefixes. The specified geographic region can be continent, country, state, city, or other user-defined region. The geographic settings in the second database can override the information in the first database. These geographic entries help determine the geographic location of a client and host IP addresses, and aid in directing the client to a host server that is geographically the closest to that client.

## Background
CROSS REFERENCE TO RELATED APPLICATIONS
The present application is a continuation of and claims the benefit under 35 U.S.C. §120 to U.S. patent application Ser. No. 12/787,779, entitled “CONFIGURABLE GEOGRAPHIC PREFIXES FOR GLOBAL SERVER LOAD BALANCING,” filed May 26, 2010 (now issued as U.S. Pat. No. 7,899,899), which in turn is a continuation of and claims the benefit under 35 U.S.C. §120 to U.S. patent application Ser. No. 12/353,701, entitled “CONFIGURABLE GEOGRAPHIC PREFIXES FOR GLOBAL SERVER LOAD BALANCING,” filed Jan. 14, 2009 (now U.S. Pat. No. 7,756,965), which in turn is a continuation of and claims the benefit under 35 U.S.C. §120 to U.S. patent application Ser. No. 10/840,496, entitled “CONFIGURABLE GEOGRAPHIC PREFIXES FOR GLOBAL SERVER LOAD BALANCING,” filed May 6, 2004 (now U.S. Pat. No. 7,496,651), all of which are assigned to the same assignee as the present application, and which are incorporated herein by reference in their entireties.


TECHNICAL FIELD
This disclosure relates generally to load balancing among servers. More particularly but not exclusively, the present disclosure relates to techniques to configure geographic information, such as geographic prefixes and geographic region designations for network addresses, for use in load balancing to determine a geographically optimum server to receive a client request.
BACKGROUND INFORMATION
Under the Transmission Control Protocol/Internet Protocol (TCP/IP), when a client provides a symbolic name (a Uniform Resource Locator or URL) to request access to an application program or another type of resource, the host name portion of the URL needs to be resolved into an IP address of a server for that application program or resource. For example, the URL (e.g., http://www.foundrynet.com/index.htm) includes a host name portion www.foundrynet.com that needs to be resolved into an IP address. The client first provides the host name portion to a local name resolver, which then queries a local Domain Name System (DNS) server to obtain a corresponding IP address. If a corresponding IP address is not locally cached at the time of the query, or if the time-to-live (TTL) of a corresponding IP address cached locally has expired, the DNS server then acts as a resolver and dispatches a recursive query to another DNS server. This process is repeated until an authoritative DNS server for the domain (e.g., foundrynet.com, in this example) is reached. The authoritative DNS server returns one or more IP addresses, each corresponding to an address at which a server hosting the application (“host server”) under the host name can be reached. These IP addresses are propagated back via the local DNS server to the original resolver. The application at the client then uses one of the IP addresses to establish a TCP connection with the corresponding host server. Each DNS server caches the list of IP addresses received from the authoritative DNS server for responding to future queries regarding the same host name, until the TTL of the IP addresses expires.
To provide some load sharing among the host servers, global server load balancing (GSLB) switches are sometimes used as proxies for authoritative DNS servers, together with one or more site switches each associated with one or more host servers. Each site switch provides the GSLB switch with current site-specific information (“metrics”) regarding access conditions to the host servers associated with the site switches. The GSLB switch then processes the addresses returned by the DNS server using the metrics compiled from the site switches and provides an ordered address list having the optimum address for access listed at the top. An example of a GSLB system and description of associated metrics are disclosed in U.S. application Ser. No. 10/376,903, entitled “GLOBAL SERVER LOAD BALANCING,” filed Feb. 28, 2003, assigned to the same assignee as the present application, and which is incorporated herein by reference in its entirety.
A criterion that is sometimes used for load balancing purposes is geographic location. That is, where there are multiple geographically located servers, load balancing systems attempt to direct client requests to a server that is geographically the closest to the client. The geographic location of the client and the servers is determined using a static table containing Internet Assigned Numbers Authority (IANA)-allocated IP address prefixes and the associated geographic locations. However, such load balancing systems that are based on static mappings between the IP address prefixes and the geographic locations have drawbacks that lead to less-than optimum performance.
For instance, load balancing systems generally maintain only a static table of some IANA-allocated IP address prefixes and the associated geographic designation. This table may be in the form of a database having IP address prefixes (e.g., IP address/prefix length) and the corresponding geographic locations (e.g., the country and region designation) for the respective IP address prefixes. There are several shortcomings to just having such a static geographic database.
First, a load balancing system maintains only some, and generally not all, of the IANA-allocated entries in its statically generated database. This is because IP address allocation by the IANA is an ongoing process, and so the load balancing software will have to be updated each time a new IP address and/or address prefix is allocated, in order to keep up with the latest IANA allocations. Since constant updating of the load balancing software and static geographic database is not practical, the load balancing system would be missing many IP address prefixes and associated geographic location information in its geographic database, and hence would not be able to determine the geographic location of many clients correctly.
Additionally, users (such as system administrators) generally cannot override the geographic region for a prefix. For instance, a prefix 149.204.0.0/16 may be specified as being in the geographic region EUROPE in a load balancing switch's internal static geographic prefix database. If the user has a client with an address of 149.204.11.1, which actually resides in ASIA, there is currently no suitable technique in which the user can override the geographic region for the prefix specified in the database. This means that the load balancing switch will always treat the client at 149.204.11.1 as being in the geographic region EUROPE, even though the user wants the prefix to be associated with ASIA.
BRIEF SUMMARY OF THE INVENTION
One aspect provides a method that includes storing first geographic settings associated with network addresses, including storing first address prefix information and corresponding first geographic region information. The method stores second geographic settings associated with network addresses, including storing second address prefix information and corresponding second geographic region information. The method overrides the first geographic settings with respective second geographic settings for network addresses that have first prefix information that matches the second prefix information, to associate these network addresses to the second geographic region information. Using at least the second geographic settings as a metric, the method load balances traffic, from a client having a network address associated with the second geographic information, to a domain represented by the network addresses associated with the second geographic information.



BRIEF DESCRIPTION OF THE DRAWINGS
Non-limiting and non-exhaustive embodiments are described with reference to the following figures, wherein like reference numerals refer to like parts throughout the various views unless otherwise specified.
FIG. 1 illustrates a GSLB system in which an embodiment may be implemented.
FIG. 2 illustrates a GSLB switch of FIG. 1 according to an embodiment.
FIG. 3 illustrates an example application of geographic criteria for GSLB according to an embodiment.
FIG. 4 is a flowchart that depicts configuration of geographic prefix data according to an embodiment.
FIG. 5 is a flowchart that depicts updating of geographic regions of domain IP addresses with user-configured geographic prefixes according to an embodiment.
FIGS. 6A-6B show a flowchart that depicts operation of the GSLB system of FIG. 1 to use geographic settings to perform load balancing according to an embodiment.



DETAILED DESCRIPTION
Embodiments of techniques to provide configurable geographic prefixes for GSLB are described herein. In the following description, numerous specific details are given to provide a thorough understanding of embodiments. One skilled in the relevant art will recognize, however, that the invention can be practiced without one or more of the specific details, or with other methods, components, materials, etc. In other instances, well-known structures, materials, or operations are not shown or described in detail to avoid obscuring aspects.
Reference throughout this specification to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Thus, the appearances of the phrases “in one embodiment” or “in an embodiment” in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
As an overview, one embodiment provides “user-configurable geographic prefixes” features that overcome the above-described shortcomings and provides several other advantages. With the user-configurable geographic prefix feature(s), the prefix (or other address portion) and the associated geographic region for that prefix can be specified. For instance, “region” could be defined based on a continent, country, state, city, or other user-defined area. In an embodiment, the user-configurable geographic prefixes can be implemented for a GSLB system, where a load balancing switch or other network device maintains a separate user-configured geographic prefix database to store the various entries. If a prefix also exists in a static internal geographic database maintained by the load balancing switch, then the user-configured entry will override it (e.g., if the prefix 200.0.0.0/8 is SOUTH AMERICA in the internal geographic database and if the user configures a geographic prefix 200.0.0.0/8 to be in the region NORTH AMERICA, then the user-configured entry will override the earlier entry, and any IP address that matches the prefix 200.0.0.0/8 will deemed to reside in NORTH AMERICA).
As described above, the user-configurable geographic prefix feature(s) can be implemented in a GSLB system. In the GSLB system, a set of metrics are used by the load balancing switch to evaluate IP addresses in the DNS replies from the DNS server for which the load balancing switch is providing GSLB. The load balancing switch may initially generate the static internal database of geographic prefixes using the IANA-allocated IP address prefixes and the associated geographic location information. These, static database entries (including any default static geographic region specifications) may be overridden with user-configured entries, as needed, in accordance with an embodiment. The geographic location of a server (e.g., a server that is geographically close to a client) can then be used as one of the metrics in the GSLB policy to determine the best IP address to receive a request from the client.
FIG. 1 illustrates one example global server load balancing system with which an embodiment may be implemented. As shown in FIG. 1, a GSLB switch 12 (i.e., a load balancing switch) is connected to an Internet 14 and acts as a proxy to an authoritative Domain Name System (DNS) server 16 for a domain “foundrynet.com” (for example). That is, while the authoritative DNS server 16 provides the actual DNS service, the IP address known to the rest of the Internet 14 for the authoritative DNS server 16 of the domain “foundrynet.com” is a virtual IP (VIP) address configured on the GSLB switch 12. Of course, authoritative DNS server 16 can also act simultaneously as an authoritative DNS for other domains. The GSLB switch 12 communicates, via the Internet 14, with site switches 18A and 18B at site 20, site switches 22A and 22B at site 24, and any other similarly configured site switches. The site switches 18A, 18B, 22A and 22B are shown, for example, connected to routers 19 and 21 respectively and to servers 26A, . . . , 261, . . . 26N. Some or all of the servers 26A, . . . , 261, . . . , 26N may host application server programs (e.g., http and ftp and others). These host servers are reached through the site switches 18A, 18B, 22A and 22B using one or more virtual IP addresses configured at the site switches, which act as proxies to the host servers.
A suitable switch for implementing either the GSLB switch 12 or any of the site switches 18A, 18B, 22A and 22B is the ServerIron® (SI) product available from Foundry Networks, Inc. of San Jose, Calif. Throughout this description and in the figures, the SI switch will be described as the network device that can provide and implement the various geographic features of an embodiment. It is understood that this use of the SI switch is merely for purposes of illustration and explanation. Any suitable non-SI switch or non-SI network device can be used to implement the various geographic features and functions described herein.
FIG. 1 also shows a client program 28 connected to the Internet 14, and that communicates with a local DNS server 30. When a browser on the client program 28 requests a web page, for example, using a Universal Resource Locator (URL), such as http://www.foundrynet.com/index.htm, a query is sent to the local DNS server 30 to resolve the symbolic host name www.foundrynet.com to an IP address of a host server. The client program 28 receives from the DNS server 30 a list of IP addresses corresponding to the resolved host name. This list of IP addresses is either retrieved from the local DNS server 30's cache, if the TTL of the responsive IP addresses in the cache has not expired, or obtained from the GSLB switch 12, as a result of a recursive query. Unlike the prior art, however, this list of IP addresses is ordered by the GSLB switch 12 based on performance metrics as described in further detail in U.S. application Ser. No. 09/670,487, entitled “GLOBAL SERVER LOAD BALANCING,” filed Sep. 26, 2000; in U.S. application Ser. No. 10/206,580, entitled “GLOBAL SERVER LOAD BALANCING,” filed Jul. 25, 2002 (disclosing embodiments of a connection-load metric for GSLB); in U.S. application Ser. No. 10/305,823, entitled “DISTRIBUTED HEALTH CHECK FOR GLOBAL SERVER LOAD BALANCING,” filed Nov. 27, 2002 (disclosing embodiments for distributing health check tasks to peer metric agents); and in U.S. application Ser. No. 10/376,903, entitled “GLOBAL SERVER LOAD BALANCING,” filed Feb. 28, 2003 (disclosing embodiments of weighted site, weighted IP, and active bindings metrics); all of which are assigned to the same assignee as the present application and incorporated herein by reference in their entireties. These are a few example applications where various GSLB performance metrics are described. For the sake of brevity, these various performance metrics and the manner in which they are used in a GSLB algorithm to identify best sites in a list of IP addresses are only summarized and not described in detail herein. Such additional details may be found in these co-pending applications and in the applications that they reference.
In the remainder of this detailed description, for the purpose of illustrating embodiments only and except where indicated, the list of IP addresses returned are assumed to be the virtual IP addresses configured on the proxy servers at switches 18A, 18B, 22A and 22B (sites 20 and 24). In one embodiment when the authoritative DNS server 16 resolves a host name in a query and returns one or more IP addresses, the GSLB switch 12 determines (using the performance metrics) which site switch would provide the best expected performance (e.g., response time) for the client program 28 and returns the IP address list with a virtual IP address configured at that site switch placed at the top. (Other forms of ranking or weighting the IP addresses in the list can also be possible.) The client program 28 can receive the ordered list of IP addresses, and typically selects the first IP address on the list to access the corresponding host server.
FIG. 2 is a block diagram showing the functional modules of an embodiment of the GSLB switch 12 and site switch 18A (for instance) relevant to the global server load balancing function, including functions and features associated with geographic data. As shown in FIG. 2, the GSLB switch 12 includes a GSLB switch controller 201, health check module 202, DNS proxy module 203, metric agent 204, routing metric collector 205, and metric collector 206. The GSLB switch controller 201 provides general control functions for the operation of the GSLB switch 12. The health check module 202 is responsible for querying, either periodically or on demand, host servers and relevant applications hosted on the host servers to determine the “health” (e.g., whether or not it is available) of each host server and each relevant application. The metric collector 206 communicates with metric agents in site-specific switches (e.g., FIG. 2 shows the metric collector 206 communicating with a remote metric agent 207 of a site server load balancing ServerIron® or “SLB SI”) to collect site-specific metrics (e.g., number of available sessions on a specific host server and/or connection-load data indicative of connections-per-second at that host server at the site 18A, or other metrics data).
The routing metric collector 205 collects routing information from routers (e.g., topological distances between nodes on the Internet). FIG. 2 shows, for example, a router 208 providing the routing metric collector 205 with routing metrics (e.g., topological distance between the load balancing switch and the router), using the Border Gateway Protocol (BGP). The DNS proxy module 203 (A) receives incoming DNS requests, (B) provides the host names to be resolved to the DNS server 16, (C) receives from the DNS server 16 a list of responsive IP addresses, (D) orders the IP addresses on the list received from the DNS server 16, using the metrics collected by the routing-metric collector 405 and the site specific collector 406, and values of any other relevant parameter (including geographic criteria), and (E) provides the ordered list of IP addresses to the requesting DNS server. Since the GSLB switch 12 can also act as a site switch, the GSLB switch 12 is provided with the metric agent 204 for collecting metrics for a metric collector.
In one embodiment, the GSLB switch controller 201 can be programmed with and/or can access data to be used for geographic metrics and also for at least one of weighted site, weighted IP, active bindings, or other metrics described in the co-pending applications identified above. For instance, the GSLB switch controller 201 can be communicatively coupled to a first storage unit 212 that contains IANA-allocated geographic prefixes and the associated geographic designation, or default geographic-related settings. The GSLB switch controller 201 can also be communicatively coupled to a second storage unit 210 that contains user-configured geographic settings. In an embodiment, the first storage unit 212 and the second storage unit 210 can be in the form of databases having tables. It is appreciated, however, that either or both of these storage units can be embodied by any suitable data structure (including file systems, directory structures, variables, static or dynamic code, and so forth). Additionally, the first and second storage units need not necessarily be separate, and may be integrated in whole or in part into a single storage unit, for instance.
FIG. 3 illustrates an example application of geographic criteria for GSLB according to an embodiment. As described above, one of the metrics that can be used by an embodiment of the GSLB switch 12 to select the best IP address for clients is the geographic metric. This metric enables the GSLB switch controller 201 to direct a client to a server that is geographically the closest to that client. In the example illustrated in FIG. 3: The GSLB switch 12 (not shown) provides GSLB for the domain www.foo.com. There are four IP addresses configured for www.foo.com: VIP-1, VIP-2, VIP-3, and RIP-4. VIP-1 is a virtual server IP address on a site switch 300 (SI-1) that resides in EUROPE. VIP-2 is a virtual server IP address on a site switch 302 (SI-2) that resides in NORTH AMERICA, VIP-3 is a virtual server IP address on a site switch 304 (SI-3) that resides in SOUTH AMERICA, and RIP-4 is a real server 306's IP address that resides in ASIA. As indicated in the example of FIG. 3, Client-1 resides in the continent of EUROPE; Client-2 is in NORTH AMERICA, Client-3 is in SOUTH AMERICA, and Client-4 is in ASIA.
When the geographic metric is used by the GSLB switch 12 to select the best IP address for the client then:

    
    
        a> If Client-1 makes a request for www.foo.com, the GSLB switch 12 will select VIP-1 as the best IP address for Client-1 since VIP-1 is the closest geographically to Client-1 (e.g., both are in EUROPE);
        b> If Client-2 makes a request for www.foo.com, the GSLB switch 12 will select VIP-2 as the best IP address for Client-2 since VIP-2 is the closest geographically to Client-2 (e.g., both are in NORTH AMERICA);
        c> If Client-3 makes a request for www.foo.com, the GSLB switch 12 will select VIP-3 as the best IP address for Client-3 since VIP-3 is the closest geographically to Client-3 (e.g., both are in SOUTH AMERICA); and
        d> If Client-4 makes a request for www.foo.com, the GSLB switch 12 will select RIP-4 as the best IP address for Client-4 since RIP-4 is the closest geographically to Client-4 (e.g., both are in ASIA).
    
    


Thus, the GSLB switch 12 of an embodiment uses the geographic metric to select the IP address that is geographically the closest to the querying client. Geographical “closeness” can be specified in multiple non-exhaustive ways. The user can specify the following, for example:

    
    
        a> A client and server are to be considered geographically close if they lie in the same continent.
        b> A client and server are considered to be geographically close if they lie in the same country.
        c> A client and server are considered to be geographically close if they reside in the same state, city, district, etc.
        d> The user can also define a fictional area and define any entity residing in that area as geographically “close.”
    
    


In an embodiment, the GSLB switch 12 deduces the geographic region of a client or server based on its IP address. The IANA assigns the IP addresses, and the GSLB switch 12 generates the static table (e.g., in the first storage unit 212) of the mappings between an IP address prefix and the corresponding geographic location. Either or both the IANA allocations or other geographic settings (including user-configured settings) may be used to deduce the geographic region of a client or server.
As an example, in the statically generated table in the first storage unit 212, the geographic region for the prefix 149.204.0.0/16 is EUROPE. Therefore, if Client-1 has an IP address 149.204.10.1, then the GSLB switch 12 refers to this static table and determines that Client-1 is in the region EUROPE. The GSLB switch 12 determines the geographic location of a real server 306 similarly based on the IP address. The GSLB switch 12 determines the geographic location of a VIP based on the management IP address of the site switch (e.g., the site switches 18A, 18B, 22A, 22B, 300-304, etc.) on which this VIP is configured. Thus, if the site switch 300 has an IP address of 149.204.53.1, then the GSLB switch 12 determines that the site switch 300 is in the region EUROPE. Therefore, VIP-1, which is configured on the site switch 300, will be deemed to be in the region EUROPE.
As additional examples and details, an embodiment of the GSLB switch 12 determines the geographic region of a server IP address in its DNS database (not shown) in the following ways:

    
    
        For real IP addresses (as opposed to VIP addresses, which are logical IP addresses configured on the site switches), the geographic region is based on the IP address itself. If the user has configured a geographic prefix that matches the real server IP address, then the geographic location of the real server (e.g., the real server 306) will be obtained from the user-configured geographic prefix entry provided in the second storage unit 210.
        For VIP addresses, the geographic region is based on the management IP address of the site switch on which the VIP is configured. If the user has configured a geographic prefix that matches the management IP address of the site switch on which the VIP is configured, then the geographic location of the VIP will be obtained from the user-configured geographic prefix entry provided in the second storage unit 210.
        The user can further explicitly specify the region for a GSLB site if the management IP address of the site switch at that site is not indicative of the geographic location. For example, if the management IP address is in a private sub-net, the address does not indicate that site switch's geographic location. If the user specifies the region for the GLSB site at which the site switch resides in the second storage unit 210, the GSLB switch 12 uses the user-specified region instead of the region of the site switch's management IP address. If the user has configured a geographic prefix entry that matches the management IP address of the site switch and has also specified a geographic location for the GSLB site where that site switch resides, then the geographic location configured for the GSLB site will take precedence over that defined in the user-configured geographic prefix entry (i.e., the geographic region for a VIP configured on the remote site switch will be obtained from the geographic location configured for the GSLB site where the remote site switch resides instead of the geographic prefix entry that matches the management IP address of that remote site switch).
    
    


An embodiment of the GSLB switch 12 determines the geographic location of the client as follows:
For each client query, the GSLB switch 12 can determine the geographic location from which the client query came based on the client's IP address (or other address of a client terminal on which the client program 28 resides). If the IP address prefix of a user-configured geographic prefix entry in the second storage unit 210 matches that of the client, then the geographic location of the client will be determined from that user-configured geographic prefix entry.
If multiple server IP addresses compare equally based on at least some of the GSLB metrics in the GSLB policy, then the GSLB switch 12 uses the geographic metric to select the server IP addresses within the same geographic region as the client query. The flowcharts of FIGS. 4-6 illustrate implementation of these concepts in further detail.
In the flowcharts of FIGS. 4-6, certain operations are depicted. At least some of these operations can be embodied in software or other machine-readable instruction stored on a machine-readable medium. For example, some of the features of the flowcharts can be present as code in the first storage unit 212, in the second storage unit 210, or in some other storage unit of the GSLB switch 12, and executable by the GSLB switch controller 201 or other processor of the GSLB switch 12. Moreover, it is appreciated that the operations need not necessarily occur in the exact order shown. Also, operations may be added, removed, combined, or modified in various embodiments.
FIG. 4 is a flowchart 400 illustrating configuration of geographic prefix data according to an embodiment. At a block 402, the user (such as a system administrator) configures the geographic prefix(es) on the GSLB switch controller 201 of the GSLB switch 12. For example, the user may set the geographic region for the prefix 149.204.0.0/16 as EUROPE.
At a block 404, the GSLB switch 12 maintains the user-configured geographic region for the prefix in a user-configurable geographic prefix database (referred to in the flowcharts as the database “DY-GEO-DB”). The DY-GEO-DB database contains the information that can be dynamically provided or changed by the user, and is maintained in the second storage unit 210 in one embodiment.
At a block 406, if the above prefix already exists in the static internal geographic database (referred to in the flowcharts as the database “ST-GEO-DB”) maintained in the first storage unit 212, then the above user configuration takes precedence over that static entry. At a block 408, the GSLB switch 12 updates the geographic region for all the IP addresses (for the domains for which the GSLB switch 12 is providing GSLB) that match the above IP address prefix, so as to reflect the new geographic region configured by the user for this prefix. The operations at the block 408 are shown in further detail in FIG. 5.
FIG. 5 is a flowchart 500 that depicts the updating of the geographic region of domain IP addresses with the user-configured geographic prefix according to an embodiment. When the user configures a geographic prefix at the block 402 of FIG. 4, then the GSLB switch 12 updates the geographic prefix for each IP address in the domain for which the GSLB switch 12 is providing GSLB.
As an example, the user configures a prefix P1 to be in a geographic region G1. Then, for each of the IP addresses in the domains for which the GSLB switch 12 is providing GSLB, the GSLB switch 12 (or more specifically the GSLB switch controller 201 in an embodiment) determines at a block 502 whether the IP address corresponds to a real server. If the IP address corresponds to a real server, then the GSLB switch 12 determines at a block 504 whether the IP address matches the prefix P1. If there is a match, then the GSLB switch 12 updates the geographic location of that IP address as the geographic region G1 at a block 506. If there is no match at the block 504, then no updates are made to the geographic location of this IP address (as depicted at a block 508).
Back at the block 502, if the IP address is determined by the GSLB switch 12 as not corresponding to a real server, then the IP address is deemed to be a VIP address at a block 510. The GSLB switch 12 then finds the management IP address of the site switch on which this VIP is configured. The IP address of the site switch may be found in a table or other address records maintained by or accessible to the GSLB switch 12. The IP address of this site switch is referred to as “SIP” address in FIG. 5.
At a block 514, the GSLB switch 12 finds the GSLB site at which the site switch resides. This GSLB site is referred to as “Site-1” in FIG. 5. The GSLB switch 12 determines at a block 514 whether there is a geographic location specified for Site-1. If there is a geographic location specified, then no change is made to that geographic location (as depicted at a block 516). Else if there is no geographic location specified for Site-1, then the flowchart 500 proceeds to a block 518.
At the block 518, the GSLB switch 12 determines whether the SIP address matches the prefix P1. If there is a match, then the GSLB switch 12 updates the geographic location of that VIP address as the geographic region G1 at the block 506. Else if there is no match at the block 518, then no updates are made to the geographic location of the VIP address (as indicated at a block 520).
FIGS. 6A-6B show a flowchart 600 that depicts operation of the GSLB system of FIG. 1 to use geographic settings, including user-configured settings, to perform load balancing according to an embodiment. At a block 602, the client program 28, located at a client IP address (CIP), makes a DNS query for a domain for which the GSLB switch 12 is providing GSLB.
At a block 604, the GSLB switch 12 checks its user-configured geographic prefix database (e.g., the DY-GEO-DB database) to determine if there is any prefix configured therein that matches the CIP. If a match is found at a block 606 and the user-configured prefix has a geographic region G1, then the CIP is deemed to be in the geographic region G1 at a block 608.
At a block 610, the GSLB switch 12 makes a selection of the best IP address to provide to the client program 28 based at least in part on the geographic metric. That is, the GSLB switch 12 of one embodiment compares the geographic location of the candidate IP addresses with that for CIP, and selects the candidate IP address that lies in the same geographic location as CIP (i.e., the region G1) as the best IP address for this client.
Back at the block 606, if no match is found between the CIP and the prefixes in the user-configured geographic prefix database, then the GSLB switch 12 checks the static geographic prefix database (e.g., ST-GEO-DB database) at a block 612 to determine if there is any prefix configured therein that matches the CIP. If no match is found at a block 614, then the GSLB switch 12 assigns some default geographic location to the client, for example the region D1, at a block 616. The GSLB switch 12 makes a selection based on the geographic metric at a block 618. The GSLB switch 12 selects the IP address that lies in the same geographic location as the CIP (e.g., the region D1 in this example) as the best IP address for this client.
Back at the block 614, if a prefix configured in the ST-GEO-DB database matches the CIP and the static prefix that is found has a geographic region G2 (for instance), then the CIP is deemed to be in the geographic region G2 at a block 620. The GSLB switch 12 makes a selection of the best IP address to provide to the client program 28 based at least in part on the geographic metric at a block 622. The GSLB switch 12 compares the geographic location of the candidate IP addresses with that for the CIP, and selects the candidate IP address that lies in the same geographic location as the CIP (e.g., the region G2) as the best IP address for this client.
An example can assist in further illustrating the operations depicted in the previous figures. Consider an example where the GSLB switch 12 is providing GSLB for the domain www.gslb1.com. The IP addresses for the domain www.gslb1.com are as follows:
10.10.10.200—This is a real server IP address; and
151.3.1.76—This is a VIP on a site switch having a management IP address of 151.3.1.102.
Initially, the user-configured geographic database (e.g., the DY-GEO-DB database in the second storage unit 210) is empty, as the user has not yet configured any geographic prefixes. Assume that there is an entry for the prefix 151.3.0.0/16 in the static geographic database (e.g., the ST-GEO-DB database in the first storage unit 212) where the geographic region for the prefix is specified as EUROPE. This means that the geographic location for 151.3.1.76 is EUROPE. Assume also that there is no entry in the static geographic database that matches the IP address 10.10.10.200; hence this IP address is assigned a default geographic location of NORTH AMERICA.
Now, the user wants the prefix 151.3.0.0/16 to be associated with ASIA instead of EUROPE. So, the user configures the geographic prefix 151.3.0.0/16 with a geographic region ASIA. This ASIA setting gets stored in the user-configured geographic prefix database, and will override the original EUROPE setting.
Once the user configures a geographic location for a prefix, the geographic location for the IP addresses in the GSLB domain gets updated as explained with respect to the flowchart 500 of FIG. 5. The new geographic locations of the IP addresses are as follows:
10.10.10.200—NORTH AMERICA (unchanged as this IP address does not match a user-configured prefix); and
151.3.1.76—ASIA.
Now, the user also wants a prefix 175.6.0.0/16 to be associated with ASIA. So, the user configures the geographic prefix 175.6.0.0/16 with a geographic region ASIA. This information also gets stored in the user-configured geographic prefix database. The GSLB switch 12 does not update the geographic location for any IP addresses in the domain www.gslb1.com, since the prefix 175.6.0.0/16 does not match any IP address.
If a client at the IP address 175.6.10.1 makes a query to access the domain www.gslb1.com, the GSLB switch 12 refers to the user-configured geographic prefix database and determines the geographic location of the client to be ASIA. The GSLB switch 12 then selects 151.3.1.76 as the best IP address for the client since they both lie in the same geographic region of ASIA.
All of the above U.S. patents, U.S. patent application publications, U.S. patent applications, foreign patents, foreign patent applications and non-patent publications referred to in this specification and/or listed in the Application Data Sheet, are incorporated herein by reference, in their entirety.
The above description of illustrated embodiments, including what is described in the Abstract, is not intended to be exhaustive or to limit the invention to the precise forms disclosed. While specific embodiments and examples are described herein for illustrative purposes, various equivalent modifications are possible within the scope of the invention and can be made without deviating from the spirit and scope of the invention.
For example, various embodiments have been described above in terms of IP addresses. It is appreciated that other embodiments for providing configurable geographic settings can be implemented for systems that use an addressing scheme that is not necessarily IP-address based.
These and other modifications can be made to the invention in light of the above detailed description. The terms used in the following claims should not be construed to limit the invention to the specific embodiments disclosed in the specification and the claims. Rather, the scope of the invention is to be determined entirely by the following claims, which are to be construed in accordance with established doctrines of claim interpretation.

## Claims

1. An apparatus, comprising:
a network device configurable to, for a network address that has a particular address prefix that matches a stored address prefix corresponding to a geographic region, associate said network address to said geographic region, said geographic region being different from an original geographic region that corresponds to the particular address prefix,
wherein said network device is configurable as a proxy to an authoritative domain name system (DNS) server.

2. The apparatus of claim 1 wherein said particular address prefix includes an Internet Assigned Numbers Authority (IANA)-allocated IP address prefix, and wherein said original geographic region that corresponds to the particular address prefix includes an IANA-designated geographic region.

3. The apparatus of claim 1 wherein said network device includes a switch.

4. The apparatus of claim 1 wherein said network device includes a storage unit to store said stored address prefix.

5. The apparatus of claim 1 wherein to said associate said network address to said geographic region, said network device is configurable to override said original geographic region with said different geographic region.

6. A method, comprising:
configuring a network device as a proxy to an authoritative domain name system (DNS) server;
storing, in said network device, an address prefix that corresponds to a geographic region; and
for a network address that has a particular address prefix that matches the stored address prefix, associating said network address to said geographic region so as to override an original geographic region that corresponds to the particular address prefix.

7. The method of claim 6 wherein said particular address prefix includes an Internet Assigned Numbers Authority (IANA)-allocated IP address prefix, and wherein said original geographic region that corresponds to the particular address prefix includes an IANA-designated geographic region.

8. The method of claim 7 wherein said original geographic region that includes said IANA-designated geographic region includes a first continent, and
wherein to said override said original geographic region, said associating includes overriding said first continent with a second continent included in said geographic region corresponding to said stored address prefix.

9. An article of manufacture, comprising:
a machine-readable storage medium having machine-readable instructions stored thereon and executable by a processor of a network device configurable as a proxy to an authoritative domain name system (DNS) server, to:
for a network address that has a particular address prefix that matches a stored address prefix corresponding to a geographic region, associate said network address to said geographic region so as to override an original geographic region that corresponds to the particular address prefix.

10. The article of manufacture of claim 9 wherein said particular address prefix includes an Internet Assigned Numbers Authority (IANA)-allocated IP address prefix, and wherein said original geographic region that corresponds to the particular address prefix includes an IANA-designated geographic region.

11. The article of manufacture of claim 9 wherein machine-readable medium further has machine-readable instructions stored thereon and executable by said processor to:
for a request from a client to access a resource, load balance access to the resource by directing said request to a site switch located in said geographic region that has overridden the original geographic region,
wherein said geographic region is geographically closer to said client than said original geographic region.

12. A method, comprising:
storing, in a network device, a first geographic region that designates a location of a client device with a network address having a first address prefix;
in response to a second address prefix matching the first address prefix, overriding by the network device the stored first geographic region with a second geographic region to change the designated location of the client device from the first geographic region to the second geographic region,
wherein the second geographic region is different from the first geographic region.

13. The method of claim 12 wherein the first geographic region includes an IANA-designated geographic region.

14. The method of claim 12 wherein the network device is configurable as a proxy to an authoritative domain name system (DNS) server.

15. The method of claim 12, further comprising load balancing, by the network device, a request from the client by directing the request from the client to a server that is in or geographically close to the second geographic region.