This section covers the information on the geolocation (Geo-DB) database which is used in the geolocation algorithm.

In the lifecycle of a GSLB configuration, geographic information for geolocated services is first loaded into the GSLB leader Controller, either in bulk or on a location-by-location basis. The data are placed into geo-DB format (specified below) for download into all DNS SEs in the SE group. As a reminder, this group is dedicated to DNS, and no application virtual services are allowed in it. The geo-DB is replicated to all follower DNS instantiations so that any of them (DNS-1 and DNS-2 in the above example) can reply to client-local DNS with the same optimally located VIP.

Record Format

Fields in an NSX Advanced Load Balancer geo-DB record are sufficient to accommodate information defined in popular third-party geolocation databases. A single record contains six comma-delimited fields. The first four are mandatory. A hyphen in the fifth or sixth position indicates the field is unspecified. The fields are as follows:

  • IP address range start

  • IP address range end

  • Latitude

  • Longitude

  • Full name of a city, for example, USA/California/San Francisco

  • Tag is reserved for special uses, for example, to store a customer-defined value for the region, say West

The name and tag fields are used for two purposes:

  • They appear in logs.

  • They can be used to merge location entries, to make the memory usage less and lookups faster, by making the lookups coarser.

File Format and Grammar Rules

Any line starting with a leading # is ignored as a comment. Location record lines may not contain leading or embedded spaces. The first line must contain V.XX, where XX is the version of the NSX Advanced Load Balancer DB. At the time of this writing, the only supported value is V.01. The optional name field is comprised of three parts, and the parts are delimited by two slashes. Any line with a parsing error is dropped. If there are more than 95% errors, the geo-DB loading operation fails. If there are lines with duplicate or overlapping addresses, the line last specified in the file dominates and overwrites the other entries. The following example illustrates a proper syntax for the IPv4 format.

V.01
# start_ip,end_ip,latitude,longitude,country/region/city,tag
# Hyphens denote an unspecified region and city within Australia
1.0.0.0,1.0.0.255,-33.4940,143.2104,Australia/-/-,-
1.0.1.0,1.0.1.255,26.0614,119.3061,China/Fujian/Fuzhou,-
1.0.2.0,1.0.3.255,26.0614,119.3061,China/Fujian/Fuzhou,-
# Neither the name nor the tag fields are specified for the IP range 2.0.2.0 to 2.0.3.255
2.0.2.0,2.0.3.255,26.0614,119.3061,-,-

Multiple files can be specified as input for source-IP-address-to-location mapping. As described later in this guide, a priority mechanism determines which data must dominate if and when multiple sources stipulate a distance for a given IP address.

Conversion from other formats to the NSX Advanced Load Balancer format is possible. Such data are merged into one static, composite geo-DB file in NSX Advanced Load Balancer format.

Clients of multi-site applications are assumed to have public or private addresses. From the perspective of NSX Advanced Load Balancer GSLB, they have direct network access to either public or private VIPs, but not both simultaneously. In public networks, network address translation may engage private sites, but private IPs are transparent to the geolocation algorithm governing public-client access. So, the geo-DB is responsible for containing one or the other kind of address, but not simultaneously both.

IPv6 Support

The following fields are available for an NSX Advanced Load Balancer geo-DB v6 record.

  • IPv6 address

  • Prefix length

  • Latitude

  • Longitude

  • Full name of a city, for example, USA/California/San Francisco

  • Tag — is reserved for special uses, for example, to store a customer-defined value for the region, say “West”

The first four fields are mandatory. A hyphen in the fifth or sixth position indicates the field is unspecified.

IPv6 File Format

The following example illustrates a proper syntax for the IPv6 database format.

V.01
# IPv6 address, prefix length,latitude,longitude,country/region/city,tag
# Hyphens denote an unspecified region and city within United States
1::3,128,1,1,United States/-/-,testing
2::2,128,5,5,United States/-/-,testing
1::1,128,3,3,United States/-/-,testing

3::3,128,8,7,United States/-/-,testing
4::4,128,9,9,United States/-/-,testing

Impact on NSX Advanced Load Balancer Controller and NSX Advanced Load Balancer SE Configuration

To support the geolocation algorithm, special consideration must be given when configuring Controllers and the SEs implementing NSX Advanced Load Balancer DNS for GSLB.

  • Memory Allocation – An NSX Advanced Load Balancer geo-DB can be very large (for example, it can easily contain 3 million entries). So, the minimum recommendation for an NSX Advanced Load Balancer DNS SE is 8 GB. The additional knob for Host Geo Profile stipulates that some of that memory (2 GB recommended) is to be exclusively devoted to the geo-DB. The geo profile permits a portion of SE memory to be reserved for geoDB.

    Note:

    This feature requires additional shared memory on the Service Engine. Refer to Extra Shared Memory in the VMware NSX Advanced Load Balancer Configuration Guide to understand the additional memory requirements and configure the same.

  • Disk Allocation – An extra 2 GB is recommended for disk size. For more information, see NSX Advanced Load Balancer Controller Sizing in the VMware NSX Advanced Load Balancer Installation Guide.

  • When the NSX Advanced Load Balancer geo-DB is large, the DNS SE needs a few seconds or minutes to load the entries into memory.

  • The CLI commands for these are discussed in Configuring Geolocation-based Algorithm using NSX Advanced Load Balancer CLI.