This article describes how to configure Disaster Recovery (DR) using NetScaler with XenDesktop 5.x.
Four NetScaler with appropriate licenses (GSLB)
Four XenDesktop 5.x farms
A simple solution for site failover is to use the Web Interface RecoveryFarm setting. This feature allows Web Interface to direct the users to alternative farms should the issues arise with the main farms, such as network or power failures.
Complete the following procedure to enable this feature:
Using a text editor, open the WebInterface.conf file.
Add the following lines, configuring the settings for this parameter according to your environment:
RecoveryFarm1=backupfarm1.recovery.co.uk,Name:RecoveryFarm1,XMLPort:80,Transport:HTTP,SSLRelayPort:443,BypassDuration:60,LoadBalance:On,TicketTimeToLive:200,RADETicketTimeToLive:200
RecoveryFarm2=backupfarm2.recovery.co.uk,Name:RecoveryFarm2,XMLPort:80,Transport:HTTP,SSLRelayPort:443,BypassDuration:60,LoadBalance:On,TicketTimeToLive:200,RADETicketTimeToLive:200
Note: The second farm is used only if the first disaster recovery farm is inaccessible. Resources are not aggregated across both disaster recovery farms because they are for production farms. Instead, the Web Interface attempts to contact each disaster recovery farm in order and enumerates resources from the first farm with which communications are established.
However, this solution is rather limited. A more resilient solution is to use NetScaler features to detect site failure and to redirect the users to alternative sites. Combining both farms High Availability (HA) features and site failover creates fault tolerant configuration that allows users’ access to Desktops though multiple levels of failures.
In this diagram, the Primary Site is running two farms, Data Center 1and Data Center 2. If Data Center 1 fails, then the Primary site NetScaler detects this and automatically re-directs the users to Data Center 2. The NetScalers in the DMZ monitors at the site level, and if a major power or network outage affects the Primary Site, it detects this and automatically re-directs the user to the Disaster Recovery Site. The NetScaler continues to monitor and redirects the users back to the Primary Site once it become available.
Create the XenDesktop farms: site1farm1, site1farm2, site2farm1, site2farm2 and publish a desktop group on each farm (refer to the XenDesktop 5 administrators guide for further information).
Configure the NetScalers: NSsite1, NSsite2, NSdmz1, NSdmz2.
NSsite1 provides load balancing and farm level failover for the primary site.
Open the GUI Web tool for NSsite1 and log on.
Create an XML monitor.
Access the Virtual Servers and Services section of the GUI.
Expand the tree and access Monitors.
Select Add.
Add a name, such as XML-monitor and set Type to CITRIX-XML-SERVICE then click Create, as displayed in the following screen shot:
Create a Server entry for the brokers in farm1 and farm2.
Create a Load Balance service for each site.
Add the XML-monitor that was created earlier.
Create the Virtual Server. This will be the IP address that Web Interface uses.
Set the IP Address and select the services created earlier, in this case, LB-service-site1farm1 and LB-service-site1farm2.
Configure load balancing type and session persistence methods and navigate to the Methods and Persistence tab.
Set the LB method. Round Robin and Least Connection are safe easy-to-use methods. However, use what is appropriate for your environment. Select from the options to set Persistence. This procedure uses SOURCEIP and use the appropriate option for your particular environment. Set the IPv4 Netmask to a suitable address range for your clients. Click Create.
In the Web Interface for site,1 create a new Web Site and set the farm address to the IP address of the Virtual Server created in the preceding steps.
Repeat the preceding steps for NSsite2.
You now have configured basic farm level failover. Next, you must configure the DMZ NetScalers for Global Server Load Balancing (GSLB).
Open the GUI administrative Website for NSdmz1 and log on. Repeat the preceding steps and create servers, services, and virtual-servers.
Create the LB service and virtual server for the Web Interface server using the same process as explained in the preceding steps.
Note: You will be binding these to the GSLB service.
Create the local and remote GSLB sites. Ensure to set the Type to LOCAL and REMOTE, as displayed in the following screen shot:
Create the local GSLB service; bind the local site and the Web Interface virtual IP address.
Create the remote GSLB service; bind the remote site and the remote Web Interface virtual IP address.
Create the GSLB virtual server.
Bind the Web Interface LB virtual server IP address to the Web Interface service created earlier.
Bind the GSLB virtual server to both the GSLB services created in the preceding steps:
Bind the Domain Name to the GSLB virtual server, for example www.example.com, as displayed in the following screen shot:
Add a service for Authoritative Domain Name Service (ADNS).
Do the same for NSdmz2.
Create the LB service and virtual server for the Web Interface server using the same process as explained in the preceding steps.
Note: You will be binding this to the GSLB service.
Create the local and remote GSLB sites. Ensure to set the Type to LOCAL and REMOTE.
Create the local GSLB service; bind the local site and the Web Interface virtual IP address.
Create the remote GSLB service; bind the remote site and the remote Web Interface virtual IP address.
Create the GSLB virtual server.
Bind the Web Interface LB virtual server IP address to the Web Interface service created earlier.
Bind the GSLB virtual server to both the GSLB services created above.
Bind the domain name to the GSLB virtual server, for example www.example.com.
Now you have a pair of GSLB enabled NetScalers, which direct the users to the Web Interface. Web Interface then communicates with another NetScaler that is load balancing the XML services on your XenDesktop 5 farms. Should a farm fail, the NetScaler fails over to the alternate farm. Should the GSLB NetScaler detect a failure, the users are diverted to the alternate site until the primary site comes online.
Citrix Documentation - XenApp and XenDesktop
CTX123976 - Citrix NetScaler Global Server Load Balancing Primer: Theory and Implementation