Global server load balancing is a method to split traffic across multiple servers using DNS and geographical locations as the means to determine to which server traffic will be sent. Generally, a global load balancer will send a client request to a server that is closer to the client, decreasing latency and for the most part improving performance.
You may not require a full implementation of a global load balancing solution, however. GSLB requires multiple instances of a suitable device that can perform this function, and depending on your needs, other solutions might be more attractive to you. If you need entire websites and applications, then GSLB is for you, but if you only need portions of your content, such as images, videos, or other large files, then a Content Delivery Network might be more suitable (and easier to deploy, since most of the work is already done for you)
The Netscaler is the only customer configurable device that does true global load balancing. Netscaler is a multifunction appliance that can perform DNS based global load balancing lookups. You can delegate via DNS a hostname to resolve to the Netscaler as a DNS server, and the device will look over the servers it is configured to load balance for, perform a distance calculation, and return an A record with the IP of the server closest to the client request.
In the global load balancing configuration, you would have multiple Netscaler appliances in different datacenters, each of these providing local load balancing services for servers behind them. The devices are configured to talk to one another so they exchange state information on each server assigned to global load balancer rotation. Any DNS request that comes to any of these configured Netscalers can then return a proper record for a server that is online and responsive. Any server not responsive is removed from the rotation and another selected.
You must already have load balancing set up, even if it is only one server being balanced. You will need additional IP addresses for some services, namely the GSLB site IP. This IP is used by the netscaler to communicate with the other netscalers in the global load balancing protocol. In this example I am using:
184.108.40.206 is named VPX1Vserver, and is the local loadbalancing VIP for that device. 220.127.116.11 will be called VPX1site, and is the local IP for that device's GSLB.
18.104.22.168 is used for VPX2Vserver, and the GSLB IP is 22.214.171.124, called VPX2site.
Go to Traffic Management > GSLB and right click to enable the feature. Then, select Sites, and then Add.
On the first device, the name is VPX1, the type is local, and the IP is 126.96.36.199, then hit close. You should see the site listed, and green. Don't add a remote site yet.
Go to Traffic Management > GSLB, and select the GSLB Wizard. Click Next. Enter the hostname that you will be load balancing (in this example, gslb.tsstesting.com) Leave the record type A, and the service type ANY. The virtual server name will populate itself. Click next.
Choose your form of balancing and persistence method, just like you would with regular load balancing. Click next.
You see here that the site is already populated, so you don't have to add anything. Instead, click on the first site's green "plus" sign. Select the Vserver on that device from the list and click create. You should see that the site is configured with the site IP and the vserver IP of your load balanced setup, and green. Click Next, then finish, and exit.
Perform the same actions on the next Netscaler, using the values for that server.
On both servers, go to Traffic Management > DNS > Records > A records, and examine the list. You should see a lot of root.servers.net entries, and your hostname in there as well, with a type of GSLB DOMAIN. if you see that, everything is going fine so far.
Go to Traffic Management > DNS > Name Servers and click Add. Enter an IP address on the netscaler (the public IP of the device will serve, you don't have to have an additional IP for this one) click local, and leave the protocol as UDP. Click create and close. You should see the effective state as enabled and up.
Go to System > Network > IPs and open the GSLB IP address. make sure that management is selected for both machines.
Now, on both servers, go back to Traffic Management > GSLB and go through the wizard again. This time. click next, and select Modify Configuration for Existing Domains. Select the hostname from the list and then hit next, and next again. In the site address field, put in the site IP address of the other netscaler and give it the other netscaler's site name and click add. The site will be populated (along as "remote") with an option to click the green plus sign again. Click the remote site plus sign to add another site. Enter the VServer service IP (the one for the load balanced servers, not the GSLB site IP) and the port, click create and close, next, and finish then exit.
If everything has been working up to this point, and both servers are configured, everything should be green in GSLB Virtual Servers, Services and Sites. You will notice that there are now two entries in GSLB services on both machines if they are properly synchronized. At this point, the servers are now communicating between each other.
Now, you have to configure DNS.
In our example gslb.tsstesting.com one would have to create NS records and glue records in the tsstesting.com zone:
gslb.tsstesting.com. IN NS NS1.gslb.tsstesting.com
gslb.tsstesting.com. IN NS NS2.gslb.tsstesting.com
NS1.gslb.tsstesting.com. IN A 10.54.0.141 ; nameserver IP of first netscaler
NS2.gslb.tsstesting.com. IN A 172.16.1.101 ; nameserver IP of second netscaler
www.tsstesting.com. IN CNAME gslb.tsstesting.com ; alias to the GSLB object on the NetScaler appliance
Remember, you can only use CNAMEs with hostnames, not the root of the domain.
What this configuration does is set the nameservers for requests for gslb.tsstesting.com to the netscaler IPs you configured DNS on. The CNAME record translates the www.tsstesting.com to a request for gslb.tsstesting.com. Any requests for www.tsstesting.com then go to the Netscaler to be resolved, and will return an A record based on the load balancing method you configured.
For more information on Netscaler global load balancing, visit:
Delegating hostnames and subdomains to a Netscaler: http://support.citrix.com/article/CTX110488
Configuring the Netscaler for global load balancing: http://support.citrix.com/article/CTX110348
Information on the MEP protocol and site monitoring: http://support.citrix.com/article/CTX111081
There are other products can can offer a similar functionality to spread out traffic on a geographical basis:
Content distribution networks allow you to upload or provide an origin server to geographically dispersed cache servers, which then provide the content to the requesting client. CDNs work best with static, bulk content, such as images, videos, and other content that doesn't change over time.
For more details on CDN: http://knowledgelayer.softlayer.com/faqs/213
Softlayer's ObjectStorage can be configured to use multiple geographic locations in our various datacenters to provide content. A geographically aware application can perform location lookups on the client request and return a URL to ObjectStorage that is close to the client. ObjectStorage also comes with a CDN front end, if needed, to provide additional caching services as noted above.
For more information and an introduction to Object Storage: http://knowledgelayer.softlayer.com/learning/introduction-object-storage