<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>15.17. Global Server Load Balancing Support</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta name="generator" content="publican 2.8" /><meta name="package" content="Apache_CloudStack-Admin_Guide-4.2.0-en-US-1-" /><script type="text/javascript" src="../../../../../toc.js"></script><script type="text/javascript">
              addID('Apache_CloudStack');
              
	      addID('Apache_CloudStack.4.2.0');
              
              addID('Apache_CloudStack.4.2.0.books');
	      addID('Apache_CloudStack.4.2.0.Admin_Guide');
              </script><link rel="home" href="index.html" title="CloudStack Administrator's Guide" /><link rel="up" href="networks.html" title="Chapter 15. Managing Networks and Traffic" /><link rel="prev" href="external-firewalls-and-load-balancers.html" title="15.16. External Firewalls and Load Balancers" /><link rel="next" href="guest-ip-ranges.html" title="15.18. Guest IP Ranges" /></head><body class="toc_embeded "><div id="tocdiv" class="toc"><iframe id="tocframe" class="toc" src="../../../../toc.html">This is an iframe, to view it upgrade your browser or enable iframe display.</iframe></div><p id="title"><a class="left" href="http://cloudstack.apache.org"><img src="Common_Content/images/image_left.png" alt="Product Site" /></a><a class="right" href="http://cloudstack.apache.org/docs"><img src="Common_Content/images/image_right.png" alt="Documentation Site" /></a></p><ul class="docnav"><li class="previous"><a accesskey="p" href="external-firewalls-and-load-balancers.html"><strong>Prev</strong></a></li><li class="next"><a accesskey="n" href="guest-ip-ranges.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" id="gslb" lang="en-US"><div class="titlepage"><div><div><h2 class="title">15.17. Global Server Load Balancing Support</h2></div></div></div><div class="para">
		CloudStack supports Global Server Load Balancing (GSLB) functionalities to provide business continuity, and enable seamless resource movement within a CloudStack environment. CloudStack achieve this by extending its functionality of integrating with NetScaler Application Delivery Controller (ADC), which also provides various GSLB capabilities, such as disaster recovery and load balancing. The DNS redirection technique is used to achieve GSLB in CloudStack.
	</div><div class="para">
		In order to support this functionality, region level services and service provider are introduced. A new service 'GSLB' is introduced as a region level service. The GSLB service provider is introduced that will provider the GSLB service. Currently, NetScaler is the supported GSLB provider in CloudStack. GSLB functionality works in an Active-Active data center environment.
	</div><div class="section" id="about-gslb"><div class="titlepage"><div><div><h3 class="title">15.17.1. About Global Server Load Balancing</h3></div></div></div><div class="para">
			Global Server Load Balancing (GSLB) is an extension of load balancing functionality, which is highly efficient in avoiding downtime. Based on the nature of deployment, GSLB represents a set of technologies that is used for various purposes, such as load sharing, disaster recovery, performance, and legal obligations. With GSLB, workloads can be distributed across multiple data centers situated at geographically separated locations. GSLB can also provide an alternate location for accessing a resource in the event of a failure, or to provide a means of shifting traffic easily to simplify maintenance, or both.
		</div><div class="section" id="gslb-comp"><div class="titlepage"><div><div><h4 class="title">15.17.1.1. Components of GSLB</h4></div></div></div><div class="para">
				A typical GSLB environment is comprised of the following components:
			</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
						<span class="bold bold"><strong>GSLB Site</strong></span>: In CloudStack terminology, GSLB sites are represented by zones that are mapped to data centers, each of which has various network appliances. Each GSLB site is managed by a NetScaler appliance that is local to that site. Each of these appliances treats its own site as the local site and all other sites, managed by other appliances, as remote sites. It is the central entity in a GSLB deployment, and is represented by a name and an IP address.
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>GSLB Services</strong></span>: A GSLB service is typically represented by a load balancing or content switching virtual server. In a GSLB environment, you can have a local as well as remote GSLB services. A local GSLB service represents a local load balancing or content switching virtual server. A remote GSLB service is the one configured at one of the other sites in the GSLB setup. At each site in the GSLB setup, you can create one local GSLB service and any number of remote GSLB services.
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>GSLB Virtual Servers</strong></span>: A GSLB virtual server refers to one or more GSLB services and balances traffic between traffic across the VMs in multiple zones by using the CloudStack functionality. It evaluates the configured GSLB methods or algorithms to select a GSLB service to which to send the client requests. One or more virtual servers from different zones are bound to the GSLB virtual server. GSLB virtual server does not have a public IP associated with it, instead it will have a FQDN DNS name.
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>Load Balancing or Content Switching Virtual Servers</strong></span>: According to Citrix NetScaler terminology, a load balancing or content switching virtual server represents one or many servers on the local network. Clients send their requests to the load balancing or content switching virtual server’s virtual IP (VIP) address, and the virtual server balances the load across the local servers. After a GSLB virtual server selects a GSLB service representing either a local or a remote load balancing or content switching virtual server, the client sends the request to that virtual server’s VIP address.
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>DNS VIPs</strong></span>: DNS virtual IP represents a load balancing DNS virtual server on the GSLB service provider. The DNS requests for domains for which the GSLB service provider is authoritative can be sent to a DNS VIP.
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>Authoritative DNS</strong></span>: ADNS (Authoritative Domain Name Server) is a service that provides actual answer to DNS queries, such as web site IP address. In a GSLB environment, an ADNS service responds only to DNS requests for domains for which the GSLB service provider is authoritative. When an ADNS service is configured, the service provider owns that IP address and advertises it. When you create an ADNS service, the NetScaler responds to DNS queries on the configured ADNS service IP and port.
					</div></li></ul></div></div><div class="section" id="concept-gslb"><div class="titlepage"><div><div><h4 class="title">15.17.1.2. How Does GSLB Works in CloudStack?</h4></div></div></div><div class="para">
				Global server load balancing is used to manage the traffic flow to a web site hosted on two separate zones that ideally are in different geographic locations. The following is an illustration of how GLSB functionality is provided in CloudStack: An organization, xyztelco, has set up a public cloud that spans two zones, Zone-1 and Zone-2, across geographically separated data centers that are managed by CloudStack. Tenant-A of the cloud launches a highly available solution by using xyztelco cloud. For that purpose, they launch two instances each in both the zones: VM1 and VM2 in Zone-1 and VM5 and VM6 in Zone-2. Tenant-A acquires a public IP, IP-1 in Zone-1, and configures a load balancer rule to load balance the traffic between VM1 and VM2 instances. CloudStack orchestrates setting up a virtual server on the LB service provider in Zone-1. Virtual server 1 that is set up on the LB service provider in Zone-1 represents a publicly accessible virtual server that client reaches at IP-1. The client traffic to virtual server 1 at IP-1 will be load balanced across VM1 and VM2 instances.
			</div><div class="para">
				Tenant-A acquires another public IP, IP-2 in Zone-2 and sets up a load balancer rule to load balance the traffic between VM5 and VM6 instances. Similarly in Zone-2, CloudStack orchestrates setting up a virtual server on the LB service provider. Virtual server 2 that is setup on the LB service provider in Zone-2 represents a publicly accessible virtual server that client reaches at IP-2. The client traffic that reaches virtual server 2 at IP-2 is load balanced across VM5 and VM6 instances. At this point Tenant-A has the service enabled in both the zones, but has no means to set up a disaster recovery plan if one of the zone fails. Additionally, there is no way for Tenant-A to load balance the traffic intelligently to one of the zones based on load, proximity and so on. The cloud administrator of xyztelco provisions a GSLB service provider to both the zones. A GSLB provider is typically an ADC that has the ability to act as an ADNS (Authoritative Domain Name Server) and has the mechanism to monitor health of virtual servers both at local and remote sites. The cloud admin enables GSLB as a service to the tenants that use zones 1 and 2.
			</div><div class="mediaobject"><img src="./images/gslb.png" width="444" alt="gslb.png: GSLB architecture" /></div><div class="para">
				Tenant-A wishes to leverage the GSLB service provided by the xyztelco cloud. Tenant-A configures a GSLB rule to load balance traffic across virtual server 1 at Zone-1 and virtual server 2 at Zone-2. The domain name is provided as A.xyztelco.com. CloudStack orchestrates setting up GSLB virtual server 1 on the GSLB service provider at Zone-1. CloudStack binds virtual server 1 of Zone-1 and virtual server 2 of Zone-2 to GLSB virtual server 1. GSLB virtual server 1 is configured to start monitoring the health of virtual server 1 and 2 in Zone-1. CloudStack will also orchestrate setting up GSLB virtual server 2 on GSLB service provider at Zone-2. CloudStack will bind virtual server 1 of Zone-1 and virtual server 2 of Zone-2 to GLSB virtual server 2. GSLB virtual server 2 is configured to start monitoring the health of virtual server 1 and 2. CloudStack will bind the domain A.xyztelco.com to both the GSLB virtual server 1 and 2. At this point, Tenant-A service will be globally reachable at A.xyztelco.com. The private DNS server for the domain xyztelcom.com is configured by the admin out-of-band to resolve the domain A.xyztelco.com to the GSLB providers at both the zones, which are configured as ADNS for the domain A.xyztelco.com. A client when sends a DNS request to resolve A.xyztelcom.com, will eventually get DNS delegation to the address of GSLB providers at zone 1 and 2. A client DNS request will be received by the GSLB provider. The GSLB provider, depending on the domain for which it needs to resolve, will pick up the GSLB virtual server associated with the domain. Depending on the health of the virtual servers being load balanced, DNS request for the domain will be resolved to the public IP associated with the selected virtual server.
			</div></div></div><div class="section" id="gslb-workflow"><div class="titlepage"><div><div><h3 class="title">15.17.2. Configuring GSLB</h3></div></div></div><div class="para">
			To configure a GSLB deployment, you must first configure a standard load balancing setup for each zone. This enables you to balance load across the different servers in each zone in the region. Then on the NetScaler side, configure both NetScaler appliances that you plan to add to each zone as authoritative DNS (ADNS) servers. Next, create a GSLB site for each zone, configure GSLB virtual servers for each site, create GLSB services, and bind the GSLB services to the GSLB virtual servers. Finally, bind the domain to the GSLB virtual servers. The GSLB configurations on the two appliances at the two different zones are identical, although each sites load-balancing configuration is specific to that site.
		</div><div class="para">
			Perform the following as a cloud administrator. As per the example given above, the administrator of xyztelco is the one who sets up GSLB:
		</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
					In the cloud.dns.name global parameter, specify the DNS name of your tenant's cloud that make use of the GSLB service.
				</div></li><li class="listitem"><div class="para">
					On the NetScaler side, configure GSLB as given in <a href="http://support.citrix.com/proddocs/topic/netscaler-traffic-management-10-map/ns-gslb-config-con.html">Configuring Global Server Load Balancing (GSLB)</a>:
				</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
							Configuring a standard load balancing setup.
						</div></li><li class="listitem"><div class="para">
							Configure Authoritative DNS, as explained in <a href="http://support.citrix.com/proddocs/topic/netscaler-traffic-management-10-map/ns-gslb-config-adns-svc-tsk.html">Configuring an Authoritative DNS Service</a>.
						</div></li><li class="listitem"><div class="para">
							Configure a GSLB site with site name formed from the domain name details.
						</div><div class="para">
							Configure a GSLB site with the site name formed from the domain name.
						</div><div class="para">
							As per the example given above, the site names are A.xyztelco.com and B.xyztelco.com.
						</div><div class="para">
							For more information, see <a href="http://support.citrix.com/proddocs/topic/netscaler-traffic-management-10-map/ns-gslb-config-basic-site-tsk.html">Configuring a Basic GSLB Site</a>.
						</div></li><li class="listitem"><div class="para">
							Configure a GSLB virtual server.
						</div><div class="para">
							For more information, see <a href="http://support.citrix.com/proddocs/topic/netscaler-traffic-management-10-map/ns-gslb-config-vsvr-tsk.html">Configuring a GSLB Virtual Server</a>.
						</div></li><li class="listitem"><div class="para">
							Configure a GSLB service for each virtual server.
						</div><div class="para">
							For more information, see <a href="http://support.citrix.com/proddocs/topic/netscaler-traffic-management-10-map/ns-gslb-config-svc-tsk.html">Configuring a GSLB Service</a>.
						</div></li><li class="listitem"><div class="para">
							Bind the GSLB services to the GSLB virtual server.
						</div><div class="para">
							For more information, see <a href="http://support.citrix.com/proddocs/topic/netscaler-traffic-management-10-map/ns-gslb-bind-svc-vsvr-tsk.html">Binding GSLB Services to a GSLB Virtual Server</a>.
						</div></li><li class="listitem"><div class="para">
							Bind domain name to GSLB virtual server. Domain name is obtained from the domain details.
						</div><div class="para">
							For more information, see <a href="http://support.citrix.com/proddocs/topic/netscaler-traffic-management-10-map/ns-gslb-bind-dom-vsvr-tsk.html">Binding a Domain to a GSLB Virtual Server</a>.
						</div></li></ol></div></li><li class="listitem"><div class="para">
					In each zone that are participating in GSLB, add GSLB-enabled NetScaler device.
				</div><div class="para">
					For more information, see <a class="xref" href="gslb.html#enable-glsb-ns">Section 15.17.2.2, “Enabling GSLB in NetScaler”</a>.
				</div></li></ol></div><div class="para">
			As a domain administrator/ user perform the following:
		</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
					Add a GSLB rule on both the sites.
				</div><div class="para">
					See <a class="xref" href="gslb.html#gslb-add">Section 15.17.2.3, “Adding a GSLB Rule”</a>.
				</div></li><li class="listitem"><div class="para">
					Assign load balancer rules.
				</div><div class="para">
					See <a class="xref" href="gslb.html#assign-lb-gslb">Section 15.17.2.4, “Assigning Load Balancing Rules to GSLB”</a>.
				</div></li></ol></div><div class="section" id="prereq-gslb"><div class="titlepage"><div><div><h4 class="title">15.17.2.1. Prerequisites and Guidelines</h4></div></div></div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
						The GSLB functionality is supported both Basic and Advanced zones.
					</div></li><li class="listitem"><div class="para">
						GSLB is added as a new network service.
					</div></li><li class="listitem"><div class="para">
						GSLB service provider can be added to a physical network in a zone.
					</div></li><li class="listitem"><div class="para">
						The admin is allowed to enable or disable GSLB functionality at region level.
					</div></li><li class="listitem"><div class="para">
						The admin is allowed to configure a zone as GSLB capable or enabled.
					</div><div class="para">
						A zone shall be considered as GSLB capable only if a GSLB service provider is provisioned in the zone.
					</div></li><li class="listitem"><div class="para">
						When users have VMs deployed in multiple availability zones which are GSLB enabled, they can use the GSLB functionality to load balance traffic across the VMs in multiple zones.
					</div></li><li class="listitem"><div class="para">
						The users can use GSLB to load balance across the VMs across zones in a region only if the admin has enabled GSLB in that region.
					</div></li><li class="listitem"><div class="para">
						The users can load balance traffic across the availability zones in the same region or different regions.
					</div></li><li class="listitem"><div class="para">
						The admin can configure DNS name for the entire cloud.
					</div></li><li class="listitem"><div class="para">
						The users can specify an unique name across the cloud for a globally load balanced service. The provided name is used as the domain name under the DNS name associated with the cloud.
					</div><div class="para">
						The user-provided name along with the admin-provided DNS name is used to produce a globally resolvable FQDN for the globally load balanced service of the user. For example, if the admin has configured xyztelco.com as the DNS name for the cloud, and user specifies 'foo' for the GSLB virtual service, then the FQDN name of the GSLB virtual service is foo.xyztelco.com.
					</div></li><li class="listitem"><div class="para">
						While setting up GSLB, users can select a load balancing method, such as round robin, for using across the zones that are part of GSLB.
					</div></li><li class="listitem"><div class="para">
						The user shall be able to set weight to zone-level virtual server. Weight shall be considered by the load balancing method for distributing the traffic.
					</div></li><li class="listitem"><div class="para">
						The GSLB functionality shall support session persistence, where series of client requests for particular domain name is sent to a virtual server on the same zone.
					</div><div class="para">
						Statistics is collected from each GSLB virtual server.
					</div></li></ul></div></div><div class="section" id="enable-glsb-ns"><div class="titlepage"><div><div><h4 class="title">15.17.2.2. Enabling GSLB in NetScaler</h4></div></div></div><div class="para">
				In each zone, add GSLB-enabled NetScaler device for load balancing.
			</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
						Log in as administrator to the CloudStack UI.
					</div></li><li class="listitem"><div class="para">
						In the left navigation bar, click Infrastructure.
					</div></li><li class="listitem"><div class="para">
						In Zones, click View More.
					</div></li><li class="listitem"><div class="para">
						Choose the zone you want to work with.
					</div></li><li class="listitem"><div class="para">
						Click the Physical Network tab, then click the name of the physical network.
					</div></li><li class="listitem"><div class="para">
						In the Network Service Providers node of the diagram, click Configure.
					</div><div class="para">
						You might have to scroll down to see this.
					</div></li><li class="listitem"><div class="para">
						Click NetScaler.
					</div></li><li class="listitem"><div class="para">
						Click Add NetScaler device and provide the following:
					</div><div class="para">
						For NetScaler:
					</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
								<span class="bold bold"><strong>IP Address</strong></span>: The IP address of the SRX.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Username/Password</strong></span>: The authentication credentials to access the device. CloudStack uses these credentials to access the device.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Type</strong></span>: The type of device that is being added. It could be F5 Big Ip Load Balancer, NetScaler VPX, NetScaler MPX, or NetScaler SDX. For a comparison of the NetScaler types, see the CloudStack Administration Guide.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Public interface</strong></span>: Interface of device that is configured to be part of the public network.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Private interface</strong></span>: Interface of device that is configured to be part of the private network.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>GSLB service</strong></span>: Select this option.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>GSLB service Public IP</strong></span>: The public IP address of the NAT translator for a GSLB service that is on a private network.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>GSLB service Private IP</strong></span>: The private IP of the GSLB service.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Number of Retries</strong></span>. Number of times to attempt a command on the device before considering the operation failed. Default is 2.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Capacity</strong></span>: The number of networks the device can handle.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Dedicated</strong></span>: When marked as dedicated, this device will be dedicated to a single account. When Dedicated is checked, the value in the Capacity field has no significance implicitly, its value is 1.
							</div></li></ul></div></li><li class="listitem"><div class="para">
						Click OK.
					</div></li></ol></div></div><div class="section" id="gslb-add"><div class="titlepage"><div><div><h4 class="title">15.17.2.3. Adding a GSLB Rule</h4></div></div></div><div class="orderedlist"><ol><li class="listitem"><div class="para">
						Log in to the CloudStack UI as a domain administrator or user.
					</div></li><li class="listitem"><div class="para">
						In the left navigation pane, click Region.
					</div></li><li class="listitem"><div class="para">
						Select the region for which you want to create a GSLB rule.
					</div></li><li class="listitem"><div class="para">
						In the Details tab, click View GSLB.
					</div></li><li class="listitem"><div class="para">
						Click Add GSLB.
					</div><div class="para">
						The Add GSLB page is displayed as follows:
					</div><div class="mediaobject"><img src="./images/add-gslb.png" alt="gslb-add.png: adding a gslb rule" /></div></li><li class="listitem"><div class="para">
						Specify the following:
					</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Name</strong></span>: Name for the GSLB rule.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Description</strong></span>: (Optional) A short description of the GSLB rule that can be displayed to users.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>GSLB Domain Name</strong></span>: A preferred domain name for the service.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Algorithm</strong></span>: (Optional) The algorithm to use to load balance the traffic across the zones. The options are Round Robin, Least Connection, and Proximity.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Service Type</strong></span>: The transport protocol to use for GSLB. The options are TCP and UDP.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Domain</strong></span>: (Optional) The domain for which you want to create the GSLB rule.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Account</strong></span>: (Optional) The account on which you want to apply the GSLB rule.
							</div></li></ul></div></li><li class="listitem"><div class="para">
						Click OK to confirm.
					</div></li></ol></div></div><div class="section" id="assign-lb-gslb"><div class="titlepage"><div><div><h4 class="title">15.17.2.4. Assigning Load Balancing Rules to GSLB</h4></div></div></div><div class="orderedlist"><ol><li class="listitem"><div class="para">
						Log in to the CloudStack UI as a domain administrator or user.
					</div></li><li class="listitem"><div class="para">
						In the left navigation pane, click Region.
					</div></li><li class="listitem"><div class="para">
						Select the region for which you want to create a GSLB rule.
					</div></li><li class="listitem"><div class="para">
						In the Details tab, click View GSLB.
					</div></li><li class="listitem"><div class="para">
						Select the desired GSLB.
					</div></li><li class="listitem"><div class="para">
						Click view assigned load balancing.
					</div></li><li class="listitem"><div class="para">
						Click assign more load balancing.
					</div></li><li class="listitem"><div class="para">
						Select the load balancing rule you have created for the zone.
					</div></li><li class="listitem"><div class="para">
						Click OK to confirm.
					</div></li></ol></div></div></div><div class="section" id="idp68195504"><div class="titlepage"><div><div><h3 class="title" id="idp68195504">15.17.3. Known Limitation</h3></div></div></div><div class="para">
			Currently, CloudStack does not support orchestration of services across the zones. The notion of services and service providers in region are to be introduced.
		</div></div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="external-firewalls-and-load-balancers.html"><strong>Prev</strong>15.16. External Firewalls and Load Balancers</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="guest-ip-ranges.html"><strong>Next</strong>15.18. Guest IP Ranges</a></li></ul></body></html>
