Configuring simple load balancing across multiple application server profiles

Simple load balancing distributes HTTP requests across multiple IBM® WebSphere® Application Server instances. Also, you can configure simple load balancing to provide failover of an application state that is maintained in an HTTP session.

Before you begin

Supported configurations Supported configurations: This offering applies to stand-alone application server profiles for IBM WebSphere Application Server Version 6.1. This offering does not include a centralized management capability such as the deployment manager in WebSphere Application Server Network Deployment.sptcfg

About this task

You can configure simple load balancing capability with WebSphere Application Server Version 6.1 by combining the plug-in configuration files of multiple stand-alone application server profiles into a single configuration file. The number of configuration files that you can combine are bound by the limits that exist in the product license agreement. Complete the following steps to configure simple load balancing:

Procedure

  1. Install WebSphere Application Server and create application server profiles. For more information, see the documentation on WebSphere Application Server installation and application server profiles.
  2. Install the enterprise application or Web module. For more information, see the documentation on the methods for installing applications or modules.
  3. Determine if you require session affinity.

    Session affinity directs requests from a given client to a specific application server. The application state maintained in the HTTP session is accessed in the HTTP session cache, which is local to the application server. Session affinity provides higher performance than database persistence of the session object, alone. Without session affinity, session requests must be obtained from the database if they are sent to a server that does not have the session object in the local cache.

  4. Configure a unique HTTP session clone ID for each application server. You must complete this step if you require session affinity.

    You can configure a unique HTTP session clone ID using wsadmin scripting or the administrative console. To use wsadmin commands for the Jython or Jacl programming language, see the documentation on configuring a unique HTTP session clone ID for each application server using scripting.

    1. Expand Servers and click Application servers > server_name.
    2. Under Container Settings, expand Web Container Settings, and click Web container.
    3. Under Additional Properties, click Custom Properties > New .
    4. In the Name field, enter HttpSessionCloneId.
    5. In the Value field, enter a unique value for the server. The unique value must be 8 - 9 alphanumeric characters; for example, test1234
    6. Click Apply or OK.
    7. Click Save to save the configuration changes to the master configuration.
  5. Optional: Configure session persistence. If you require session failover capability, you must configure session persistence. Persistence of the session object to a database is the only option for session failover with WebSphere Application Server. To configure session persistence using the administrative console, see the documentation on configuring database session persistence. To configure database session persistence using wsadmin commands for the Jython or Jacl programming language, see the documentation on configuring database session persistence using scripting.
  6. Restart the server.
  7. Manually merge the plugin-cfg.xml files from up to two application server nodes.
    Supported configurations Supported configurations: The licensing for WebSphere Application Server enables you to configure the plug-in to direct HTTP requests for up to two application servers.sptcfg

    For more information about manually merging the plugin-cfg.xml files, see the Technote on merging plugin-cfg.xml files from multiple nodes.

  8. Generate the plugin-cfg.xml file for each stand-alone application server using the GenPluginCfg script, the administrative console, or wsadmin scripting.

    To use the GenPluginCfg script, enter the following command on the command line:profile_root/config/cells/GenPluginCfg.sh|bat

    To use the administrative console, see the documentation on creating or updating a global Web server plug-in configuration file.

    The following variables apply to the Jython and Jacl commands:
    • cell_name is the name of your cell.
    • Web_server_node is the name of the node for your Web server.
    • Web_server_name is the name of your Web server.
    Jython
    On the command line, enter each of the following commands on a separate line:

    generator = AdminControl.completeObjectName('type=PluginCfgGenerator,*')
    AdminControl.invoke(generator, 'generate', "profile_root/config cell_name Web_server_node Web_server_name true true")

    Jacl
    On the command line, enter each of the following commands on a separate line:

    set generator [$AdminControl completeObjectName type=PluginCfgGenerator,*]
    $AdminControl invoke $generator generate "profile_root/config cell_name Web_server_node Web_server_name true true"

  9. [AIX] [HP-UX] [Linux] [Solaris] Ensure that you have defined the correct operating system file access permissions for the merged plugin-cfg.xml file. These file access permissions allow the HTTP server plug-in process to read the file.

Results

When you complete this process, you have one plug-in configuration file for multiple stand-alone application server profiles.



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 30, 2013 4:53:43 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-base-dist&topic=twsv_configsimplelb
File name: twsv_configsimplelb.html