5.5.1 Basic Load Balancer scenario with customizable advisor settings

 

+

Search Tips   |   Advanced Search

 

The advisor used in our basic scenario tested the connectivity to the Web server by sending the following request:

HEAD / HTTP/1.0

This request is served by the Web server default index page. There are certain situations where this request will be inappropriate:

  • If the Web server cannot serve a default page for URI " /"; this causes the request to fail, although the actual application is running fine in the back-end appservers.

  • If the Web server plug-in fails, the Web server can still respond to this request if it is a local page, but it will not be able to communicate with the appservers. Any request sent to this Web server which requires communication with the back-end appservers will fail.

    We have two options to solve this problem: we can customize the request that is sent by the advisor, so we make sure the request tests the Web server plug-in and the back-end appserver, or we can write a custom advisor.

    We first explain how to customize the advisor request, and later in 5.5, Load Balancer: additional configuration options we explain the custom advisors.

    Using the basic scenario that was set up in 5.2, Load Balancer configuration: basic scenario, we now change the advisor request so it uses an application request: /wlm/BeenThere.

    1. Open the Load Balancer GUI and connect to the Dispatcher server.

    2. Select http1 from the left pane (on Port:80).

    3. In the right pane, click the Configuration Settings tab.

    4. Enter the following into the HTTP Advisor Request field:

      HEAD /wlm/BeenThere HTTP/1.0

      Click the Update Configuration button.

    5. In the HTTP Advisor Response field type: 200

      Click the Update Configuration button.

    6. Repeat steps 2 through 5 for each Web server.

      You can check if the advisor is receiving responses for the new request in the dscontrol manager report command, Monitor (select the Port load data type), or you can click Advisor: Http 80 in the left pane of the GUI and check the Server Statistics in the right pane

      Check the access log of each Web server, you should see the entries shown in Example 5-24 which correspond to the advisor requests.

      10.20.10.102 - - [22/Oct/2004:16:05:50 -0400] "HEAD /wlm/BeenThere HTTP/1.0" 200 -
      10.20.10.102 - - [22/Oct/2004:16:06:02 -0400] "HEAD /wlm/BeenThere HTTP/1.0" 200 -
      10.20.10.102 - - [22/Oct/2004:16:06:10 -0400] "HEAD /wlm/BeenThere HTTP/1.0" 200 -
      10.20.10.102 - - [22/Oct/2004:16:06:23 -0400] "HEAD /wlm/BeenThere HTTP/1.0" 200 -
      10.20.10.102 - - [22/Oct/2004:16:06:30 -0400] "HEAD /wlm/BeenThere HTTP/1.0" 200 -
      10.20.10.102 - - [22/Oct/2004:16:06:37 -0400] "HEAD /wlm/BeenThere HTTP/1.0" 200 -
      10.20.10.102 - - [22/Oct/2004:16:06:45 -0400] "HEAD /wlm/BeenThere HTTP/1.0" 200 -
      10.20.10.102 - - [22/Oct/2004:16:06:57 -0400] "HEAD /wlm/BeenThere HTTP/1.0" 200 -
      10.20.10.102 - - [22/Oct/2004:16:07:28 -0400] "HEAD /wlm/BeenThere HTTP/1.0" 200 -
      
      

      Example 5-25 shows the commands that use to set the same parameters using the command line interface. Please note that each individual command has to be on one line in the configuration file.

      dscontrol server set cluster.itso.ibm.com:80:http2 advisorrequest "HEAD /wlm/BeenThere HTTP/1.0"
      dscontrol server set cluster.itso.ibm.com:80:http2 advisorresponse "200"
      
      dscontrol server set cluster.itso.ibm.com:80:http1 advisorrequest "HEAD /wlm/BeenThere HTTP/1.0"
      dscontrol server set cluster.itso.ibm.com:80:http1 advisorresponse "200"
      
      

    Next