In the above code, lbplugin is a name that uniquely identifies
the Object, and web_server_install_dir/web_server_instance/config/loadbalancer.xml is the location of the XML configuration file for the virtual server on
which the load balancer is configured to run.

Using Apache Web Server

To use Apache Web Server, you must perform certain configuration steps before
installing the load balancer plug-in. The load balancer plug-in installation also
makes additional modifications to the Apache Web Server. After the plug-in is installed,
you must perform additional configuration steps.

Note –

On Apache 1.3, when more than one Apache child processes runs, each process
has its own load balancing round robin sequence. For example, if there are two Apache
child processes running, and the load balancer plug-in load balances on to two application
server instances, the first request is sent to instance #1 and the second request
is also sent to instance #1. The third request is sent to instance #2 and the fourth
request is sent to instance #2 again. This pattern is repeated (instance1, instance1,
instance2, instance2, etc.)This behavior is different from what you might expect,
that is, instance1, instance2, instance1, instance2, etc. In Sun Java System Application
Server, the load balancer plug-in for Apache instantiates a load balancer instance
for each Apache process, creating an independent load balancing sequence.

Apache 2.0 has multithreaded behavior if compiled with the --with-mpm=worker option.

On the Linux platform, install Sun Java System Application Server on the
same machine.

On the Solaris operating system, ensure that gcc version
3.3 and make are in the PATH, and flex is installed.

On the Solaris 10 operating system, before running make for
OpenSSL, run mkheaders, located in /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3/install-tools on Solaris SPARC or /usr/local/lib/gcc-lib/i386-pc-solaris2.9/3.3/install-tools on Solaris x86.

If you are using gcc on Red Hat Enterprise Linux
Advanced Server 2.1, the version must be later than gcc 3.0.

Note –

To use C compiler other than gcc, set the path of the
C compiler and make utility in the PATH environment variable. For example, with the sh shell: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:appserver_installdir/lib

On the Linux platform, install Sun Java System Application Server on the
same machine.

On the Solaris operating system, ensure that gcc version
3.3 and make are in the PATH, and flex is installed.

On the Solaris 10 operating system, before running make for
OpenSSL, run mkheaders, located in /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3/install-tools on Solaris SPARC or /usr/local/lib/gcc-lib/i386-pc-solaris2.9/3.3/install-tools on Solaris x86.

If you are using gcc on Red Hat Enterprise Linux
Advanced Server 2.1, the version must be later than gcc 3.0.

Note –

To use a C compiler other than gcc, set the path of
the C compiler and make utility in the PATH environment variable. For example, with
the sh shell:export LD_LIBRARY_PATH=app_server_install_dir/lib:$LD_LIBRARY_PATH.

Configuration before Installing the Load Balancer Plug-in

Before installing the load balancer plug-in for Apache,
install the Apache Web Server. The Apache source must be compiled and built to run
with SSL. This section describes the minimum requirements and high-level steps needed
to successfully compile Apache Web Server to run the load balancer plug-in. These
requirements and steps only apply to the Solaris and Linux versions of the software.
For information on the Windows version of Apache, see the Apache web site.

To Install SSL-aware Apache

Before You Begin

You must have already downloaded and uncompressed the Apache software.

Download and unpack the OpenSSL source.

Compile and build OpenSSL.

This step is not required on the
Linux platform if OpenSSL 0.9.7.e is installed.

In the Environment Variables window, under System Variables, click New. Enter Variable
name of NSPR_NATIVE_THREADS_ONLY and Variable value of 1.

Restart the machine.

Modifications to Microsoft IIS

To configure Microsoft Internet Information
Services (IIS) to use the load balancer plug-in, modify certain properties in Windows
Internet Services Manager. The Internet Services Manager is located in the Administrative
Tools folder in the Control Panel folder.

Make these modifications after installing the Sun Java System Application Server.

To Configure Microsoft IIS to use the Load Balancer Plug-in

Open the Internet Services Manager.

Select the web site for which you want to enable the plug-in.

This web site is typically named the Default Web Site.

Right click on the web site and select Properties to open the Properties
notebook.

Add a new ISAPI filter, following these steps:

Open the ISAPI Filters tab.

Click Add.

In the Filter Name field, enter Application Server

In the Executable field, type C:\Inetpub\wwwroot\sun-passthrough\sun-passthrough.dll

Click OK, and close the Properties notebook.

Create and configure a new virtual directory:

Right click on the default web site, select New, and then Virtual Directory.

The Virtual Directory Creation Wizard opens.

In the Alias field, type sun-passthrough .

In the Directory field, type C:\Inetpub\wwwroot\sun-passthrough.

Check the Execute Permission checkbox.

Leave all other permission-related
check boxes are left unchecked.

Click Finish.

Add the path of sun-passthrough.dll file and application_server_install_dir/bin to the system’s PATH environment variable.

Restart the machine.

Stop and start the web server for the new settings to take effect.

To stop the web server, right click on the web site and select Stop . To start the web server, right click on the web site and select Start.

Type the following in a web browser to access the
web application context root: http://webserver_name/web_application, where webserver_name is
the host name or IP address of the web server and web_application is
the context root that you listed in the C:\Inetpub\wwwroot\sun-passthrough\sun-passthrough.properties file.

Automatically configured Sun-passthrough properties

The installer automatically configures the following properties in sun-passthrough.properties. You can change the default values.

Property

Definition

Default Value

lb-config-file

Path to the load balancer configuration file

IIS_www_root\sun-passthrough\loadbalancer.xml

log-file

Path to the load balancer log file

IIS_www_root\sun-passthrough\lb.log

log-level

Log level for the web server

INFO

Configuring Multiple Web Server Instances

The Sun Java System Application
Server installer does not allow the installation of multiple load balancer plug-ins
on a single machine. To have multiple web servers with the load balancer plug-in on
a single machine, in either a single cluster or multiple clusters, a few manual steps
are required to configure the load balancer plug-in.

To Configure Multiple Web Server Instances

Configure the new web server instance to use the load balancer plug-in.