dev@glassfish.java.net

Re: Pointer to documentation on using other Load Balancers?

From: Abhijit Kumar <Abhijit.Kumar_at_Sun.COM>
Date: Tue, 22 Aug 2006 10:45:40 -0700

Please see Sun product documentation for previous release of application
server (8.1)

http://docs.sun.com/app/docs/doc/819-2555/6n4r9qo8g?a=view

The instructions in the product documentation apply when load balancer
plugin is installed using the product installer.

GlassFish v2 milestone 1 binary has load balancer plugin in the folder
lib/lbplugin. The instructions vary by the web server.

For Apache web server, the following instructions should work (though I
haven't tried it) and it would be great if someone can try it out and
let us know the results. Please note that these instructions are in
addition to what is documented in the URL above (thanks Sathyan and
Snjezana for writing this up).

      1). Create the following directories
            a). <ApacheInstallDir>/libexec/errorpages
            b). <ApacheInstallDir>/libexec/resource
    
    2). Copy
            
<AppServerInstallDir>/lib/lbplugin/<OS>/apache/mod_loadbalancer.so
          as
             <ApacheInstallDir>/libexec/resource/mod_loadbalancer.so
    
     3). Add execute permission to
<ApacheInstallDir>/libexec/resource/mod_loadbalancer.so


     4). Copy
            
<AppServerInstallDir>/lib/lbplugin/<OS>/iws/errorpages/sun-http-lberror.html
           as
             <ApacheInstallDir>/libexec/errorpages/sun-http-lberror.html

    5). Copy
           <AppServerInstallDir>/lib/lbplugin/<OS>/apache/*.res
         To
             <ApacheInstallDir>/libexec/resource

       7). Copy
<AppServerInstallDir>/lib/install/templates/loadbalancer.xml.example
          as
            <ApacheInstallDir>/conf/loadbalancer.xml

        8). Copy
<AppServerInstallDir>/lib/dtds/sun-loadbalancer_1_2.dtd
          as
            <ApacheInstallDir>/conf/sun-loadbalancer_1_2.dtd

       9). Append the following lines to <ApacheInstallDir>/conf/httpd.conf

       NOTE: Replace 'ApacheInstallDir","IPADDRESS","HOSTNAME" with
appropriate values.

       For linux append the following lines
  
        ##BEGIN LB Plugin Parameters
        LoadModule apachelbplugin_module libexec/mod_loadbalancer.so
        <IfModule mod_apachelbplugin.cpp>
        config-file <ApacheInstallDir>/conf/loadbalancer.xml
        locale en
        </IfModule>
        <VirtualHost IPADDRESS >
        DocumentRoot "<ApacheInstallDir>/htdocs"
        ServerName HOSTNAME
        </VirtualHost>
        ##END LB Plugin Parameters

        For solaris append the following lines

        ##BEGIN LB Plugin Parameters
        LoadFile /usr/lib/libCstd.so.1
        LoadModule apachelbplugin_module libexec/mod_loadbalancer.so
        <IfModule mod_apachelbplugin.cpp>
        config-file <ApacheInstallDir>/conf/loadbalancer.xml
        locale en
        </IfModule>
        <VirtualHost IPADDRESS >
        DocumentRoot "<ApacheInstallDir>/htdocs"
        ServerName HOSTNAME
        </VirtualHost>
        ##END LB Plugin Parameters


       10). Edit <ApacheInstallDir>/bin/apachectl script
          Add the following entries to LD_LIBRARY_PATH
                
/usr/lib:/usr/lib/mps:<ApacheInstallDir>/libexec:<AppserverInstallDir>/lib.

       11). stop and restart the apache web server.

Eduardo Pelegri-Llopart wrote:

> Hi Abhijit, can you send us a pointer to the doc describing how to use
> Apache and IIS as load balancers to GF V2?
>
> Thanks,
> - eduard/o
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>