Secure Global Desktop 4.31 Administration Guide > Arrays, servers and load balancing > Load balancing webtop sessions
Webtop session load balancing is concerned with choosing a Secure Global Desktop server to log in to. You can use a number of mechanisms to choose an Secure Global Desktop server, such as an external hardware load balancer or round-robin DNS.
When load balancing webtop sessions, the most important factor is webtop session persistence. A webtop session begins when a user logs in to a Secure Global Desktop server and the session is owned by that server. As the user interacts with Secure Global Desktop, further HTTP requests are sent over the webtop connection to the Secure Global Desktop Web Server. If network connections are load-balanced, webtop HTTP requests might be directed to any member of the array. If a webtop request goes to an array member that does not own the webtop session, this can cause the webtop session to transfer to that array member (sometimes called session grabbing) and the windows of any running applications might disappear, or the request can cause the visible state of the user's webtop session to be incorrect. This means to load balance webtop sessions successfully, webtop requests must persist so that they always go to the correct Secure Global Desktop server.
In a default Secure Global Desktop installation, additional configuration using a load-balancing JavaServer Page (JSP) is required to make webtop connections persistent. The JSP contains a JavaScript script that sets a cookie, and that cookie is used to redirect webtop HTTP requests to the correct server.
The load-balancing JSP can only be used if the following conditions are met:
The load-balancing JSP can be used in two ways:
To use the load-balancing JSP to distribute webtop sessions, one member of the array acts as the load distribution server. The following configuration uses the primary server in the array.
/sgd
web application directory.
# cd /opt/tarantella/webserver/tomcat/*/webapps/sgd/ # cp -r admin/loaddist/ swcd/
Amend the hosts = new Array
section, for example:
hosts[0] = "http://www1.indigo-insurance.com" hosts[1] = "http://www2.indigo-insurance.com" ... hosts[4] = "http://www5.indigo-insurance.com"
If you are using secure connections, ensure the URLs begin https://
.
Note Only include the primary server in the list if you want the primary server to host webtop sessions.
LBHOST
variable.
Remove the first comment marks (//
) as follows:
var LBHOST = null // Not in Load Balancer/Round Robin DNS mode
http://primary.indigo-insurance.com/sgd
.
The login URL must be the primary server.
Note The http://primary.example.com
URL can also be used, but this URL cannot be used in a Client Profile.
To configure HTTPS connections:
If needed, users can log in to the primary server by using the URL of the webtop as the login URL, for example use
http://primary.indigo-insurance.com/sgd/standard.jsp
for the standard webtop.
When using an external mechanism for load balancing, such as a hardware load balancer or round-robin DNS, the following factors are important:
The following configuration is an example of using the load-balancing JSP with an external hardware load balancer. The load balancer is also an SSL accelerator. The load balancer has also been configured to allow access to the Secure Global Desktop servers using their external DNS names. With this configuration:
You configure the load-balancing JSP as follows:
/sgd
web application directory.
# cd /opt/tarantella/webserver/tomcat/*/webapps/sgd/ # cp -r admin/loaddist/ swcd/
Amend the hosts = new Array
section, for example:
hosts[0] = "http://www1.indigo-insurance.com" hosts[1] = "http://www2.indigo-insurance.com" ... hosts[4] = "http://www5.indigo-insurance.com"
LBHOST
variable.
Remove the first comment marks (//
) and enter the external DNS name of the host, for example:
var LBHOST = "http://www1.indigo-insurance.com"" // LB mode
https://loadbalancer.indigo-insurance.com/sgd
.
The login URL must contain the load balancer DNS name.
Note The https://loadbalancer.example.com
URL can also be used, but this URL cannot be used in the Client Profile.
To use HTTPS connections to the Secure Global Desktop servers, ensure that the URLs
in the load-balancing JSP begin https://
. Then perform either of the following configuration:
Using Secure Global Desktop in firewall forwarding mode can also help to simplify the configuration needed when using an external load balancer. With firewall forwarding, the HTTP and AIP connections to Secure Global Desktop are made over a single port, usually TCP port 443. The Secure Global Desktop server listens on this port for any AIP traffic and forwards all other traffic to the Secure Global Desktop Web Server.
If Secure Global Desktop security services are enabled and the external load balancer is configured to decrypt SSL connections and forward them as unencrypted connections, you must configure each array member to accept plain text connections on the secure port. In Array Manager, on each array member's Security panel, check Accept plaintext on secure port. Also the security certificate for each array member must be installed on the external load balancer. This allows the Secure Global Desktop SSL daemon to accept plain text on the port configured for secure connections and forward it to Secure Global Desktop as SSL traffic it had decrypted itself.
This section describes the additional configuration available for the load-balancing JSP.
By default, the standard webtop is used. To use another webtop, for example a customized webtop, amend the following line:
var TARGET="/sgd/standard.jsp"
By default, the load-balancing JSP displays a splash screen in English using the images in the /sgd/swcd/
directory.
To display a localized splash screen, change the default location of the splash screen images as follows:
// ** Location of gif files <% // If the gifs are located in the locale dependent resource use the Path below String path = getContextPath(request) + "/resources/images/splash/locale=" + getBestSupportedLocale(request) + "/"; // Default location //String path = "swcd/"; %>
The following tables lists the other variables used by the load-balancing JSP.
Variable | Default | Description |
---|---|---|
SGDLDCOOKIE |
SGD_SWCDCOOKIE |
The name of the cookie used for load balancing purposes. |
TIMEOUT |
10000 | The time in milliseconds the load-balancing JSP waits for a response from the Secure Global Desktop Web Server on the selected host. If the timeout period elapses, the next host in the list is tried. |
TESTGIF |
/sgd/resources/images/webtop/secure.gif |
The file the load-balancing JSP attempts to get from the web server on the selected host. This is used to check whether the host is available. |
Copyright © 1997-2007 Sun Microsystems, Inc. All rights reserved.