You might want to direct traffic from a local DNS (LDNS) server or network to a GSLB service other than the GSLB service that the static proximity method selects for that traffic. That is, you have a preferred location for that traffic. To override the static proximity method with preferred locations, you can do the following:
-
Configure a DNS action that consists of a list of preferred locations. For more information about configuring a DNS action, see
Configuring a DNS Action.
-
Configure a DNS policy to identify the traffic arriving from the LDNS server or network for which you want to override static proximity, and apply the action in the policy.
-
Bind the policy to the global request bind point.
-
When configuring static proximity load balancing, if multiple GSLB services belong to the same location, then the round robin method is implemented for all the GSLB services associated with that location.
-
When using a DNS-based preferred location policy in conjunction with round robin load balancing, the location policy overrides the round robin method if a match occurs.
In the DNS action, you can configure a list of up to 8 preferred locations. The locations must be provided in the dotted qualifier notation, which is the notation in which you add custom locations to the static proximity database. The locations can include wildcards for qualifiers that you want to omit. For information about the dotted qualifier notation for locations, see
Adding Custom Entries to a Static Proximity Database. When entering the preferred locations, you must enter them in the descending order of priority.
When a policy evaluates to TRUE, the NetScaler appliance matches the preferred locations, in priority order, with the locations of GSLB services. Matches are of the following two types:
-
If all the non-wildcard qualifiers in a preferred location match the corresponding qualifiers in the location of a GSLB service, the match is considered a perfect match. For example, a GSLB service location of *.UK.*.* or Europe.UK.*.* is a perfect match for the preferred location *.UK.*.*.
-
If only a subset of the non-wildcard qualifiers match, the match is considered a partial match. For example, a GSLB service location of Europe.EG is a partial match for the preferred location Europe.UK.
When a DNS policy evaluates to TRUE, the following algorithm is used to select a GSLB service:
-
The appliance evaluates the preferred location that has the highest priority and moves down the priority order until a perfect match is found between a preferred location and the location of a GSLB service.
If a perfect match is found, the appliance checks whether the corresponding GSLB service is up. If it is up, it returns the IP address of the GSLB service in the DNS response. If multiple perfect matches are found (which can happen when one or more wildcards are used in a preferred location), the appliance checks the state of each of the corresponding GSLB services and load balances the GSLB services that are up.
-
If a perfect match is not found for any of the preferred locations, the appliance returns to the preferred location that has the highest priority and moves down the priority order until a partial match is found between a preferred location and the location of a GSLB service.
If a partial match is found, the appliance checks whether the corresponding GSLB service is up. If it is up, it returns the IP address of the GSLB service in the DNS response. If multiple partial matches are found, the appliance checks the state of each of the corresponding GSLB services and load balances the GSLB services that are up.
-
If none of the perfect and partial matches are up, the appliance load balances all other available GSLB services.
In this way, the appliance implements a type of site affinity for traffic that matches the DNS policy.