GSLB Site Selection with Fallback and Preferred-Site Options

As outlined in Avi DNS policy three types of policy actions can be mated with policy matches. In the Avi UI those actions are referred to as:

  1. Allow/Drop Query
  2. Query Response
  3. GSLB Site

This article focuses on the third action (often called GSLB site selection) and its fallback_site_names and is_preferred_site options.

Note: Site selection was introduced in release 17.1.5. The ability to define a single fallback site and set the preferred-site option were introduced in release 17.2.5. Starting with release 17.2.7, the fallback site limit was increased from 1 to 16.

Illustrative Use Case

A simple use case illustrates how the feature might be used:

  • There are three GSLB sites, one in Paris, one in Lyons, and one in Antwerp.
  • Avi’s geolocation algorithm is in play, and in most cases will choose the site closest to the client.
  • A client situated close to the French-Belgian border would normally be directed to Antwerp based on proximity, but, since the client is in France (or some other criterion is matched), the GSLB-site-selection action instead returns the VIP of a site having the site name “FRANCE.”

How It Works

Site selection features are engaged by defining a DNS policy rule. A rule match bypasses whatever chosen GSLB load-balancing algorithm might be associated with the virtual service. By way of review, by default there are five ways to effect a match, as shown in figure 1. More can be added.

five match types
Figure 1. The five match types.



Whatever the match, if one is made, the action will be taken, as follows:

  1. Avi Vantage looks for a VIP whose site_name parameter is equal to the desired value (“FRANCE” in the above use case). Note: There may be more than one VIP with the given site name, in which case the first one found is returned.
  2. If not one matching site is healthy and reachable, Avi checks to see if any sites have been defined as fallback sites (up to 16 may be defined). If such is the case, the VIP of the first healthy and reachable fallback site found is returned.
  3. Finally, if not one of the fallback sites are healthy and reachable, if the is_site_preferred parameter has been set to True, then rather than return no address at all, the DNS VS reverts to the GSLB algorithm in force. In our use case example, Antwerp would be chosen.