Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Quick Start Guide

- Previous: Starting Load Balancing
- Next: Cleaning Up

## Verifying Load Balancing

Once the application is deployed and the load balancer is running, verify that the load balancing is working.

### To Verify Load Balancing

1. To display the first page of the clusterjsp application, type this URL in your browser:

   `http://`localhost`:`web_server_port`/clusterjsp`

   Replace the localhost variable with the name of the system that the Web Server is running on.

   Replace the web_server_port variable with the value of the port attribute of the `LS` element in web_server_install_dir`/https-`hostname`/config/server.xml`. For this example, port 38000 is used.

   A page similar to what you saw in To Verify the Application Deployment. appears.

2. Examine the Session and Host information displayed. For example:

   - `Executed From Server:` localhost

   - `Server Port Number: 38000`

   - `Executed Server IP Address: 192.18.145.133`

   - `Session Created: Day Mon 05 14:55:34 PDT 2005`

3. The Server Port Number is 38000, the Web Server’s port. The load balancer has forwarded the request on the two instances in the cluster.

4. Using different browser software, or a browser on a different machine, create a new session. Requests from the same browser are “sticky” and go to the same instance.

   These sessions should be distributed to the two instances in the cluster. You can verify this by looking at the server access log files located here:

   - Solaris Java Enterprise System installation:

     `/var/opt/SUNWappserver/nodeagents/`nodeagent_name`/i1/logs/access/server_access_log`

     `/var/opt/SUNWappserver/nodeagents/`nodeagent_name`/i2/logs/access/server_access_log`

   - Linux Java Enterprise System installation:

     `/var/opt/sun/appserver/nodeagents/`nodeagent_name`/i1/logs/access/server_access_log`

     `/var/opt/sun/appserver/nodeagents/`nodeagent_name`/i2/logs/access/server_access_log`

   - Windows Java Enterprise System installation:

     install-dir`\nodeagents\`nodeagent_name`\i1\logs\access\server_access_log`

     install-dir`\nodeagents\`nodeagent_name`\i2\logs\access\server_access_log`

   - Stand-alone Application Server installations:

     install-dir`/nodeagents/`nodeagent_name`/i1/logs/access/server_access_log`

     install-dir`/nodeagents/`nodeagent_name`/i2/logs/access/server_access_log`

5. Add a name and value pair (`Name=Name Value=Duke`) for storing in `HttpSession`.

6. Click the “Add to Session Data” button.

7. Verify that the session data was added

##### Next Steps

In this section you created an instance to use as a load balancer and set up a load balancing configuration. You also verified load balancing.

To configure and verify HTTP session failover, continue to Chapter 2, Quick Start for Setting Up High Availability Failover. Otherwise continue on to Cleaning Up.

- Previous: Starting Load Balancing
- Next: Cleaning Up

- © 2010, Oracle Corporation and/or its affiliates