Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP WebQoS Peak for HP-UX Concepts and Operation Guide > Chapter 3 HP WebQoS Peak for Netscape

Configuring HP WebQoS for Netscape

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

You must install the Netscape Enterprise Server before you run the setup script. If you re-install the Netscape Enterprise Server, you must re-run the setup script.

Running the Setup Script

To run the setup script, type:

/opt/webqospk/setup.nes

At the Root pathname of Netscape server prompt, enter the Netscape Server root directory.

The setup script will automatically configure and enable HP WebQoS.

Default values set for all applicable configuration parameters are listed in “HP WebQoS Configurable Parameters for Netscape”.

You can also run the setup script by typing ./setup from the /opt/webqospk directory. This script prompts you for the type of web server (Netscape or Zeus) that you are configuring.

Setting the HP WebQoS Configurable Parameters for Netscape

You can edit the configuration parameters in two different ways:

  • You can access the HP WebQoS Settings administration web page at the URL http://system_name/hpac. Your Netscape Server must be running to access this page. Use the system's root user and password to access this page.

  • You can edit the configuration file /opt/ns-server_name/server_id/config/hpac/config.ac

    Refer to “HP WebQoS Configurable Parameters for Netscape” for a list of the available configurable parameters for the Netscape server.

The following is an example of the "HP WebQoS" page:

The following sections describe the parameters that can be set using the HP WebQoS Settings administration web page. “HP WebQoS Configurable Parameters for Netscape” for a list of the available configurable parameters for the Netscape server and a list of defaults already configured in config.ac.

Admit Sessions

For the default value, the load threshold is set to 2.

Table 3-1 HP WebQoS for Netscape Configurable Parameters: Admit Sessions

ParameterDescription
ShutdownAfter the specified number of seconds, do not admit any new sessions and reject all remaining sessions.
AlwaysDisable HP WebQoS and admit all sessions to the web server. If you are permanently disabling HP WebQoS, you should remove HP WebQoS from your system (see “Removing HP WebQoS for Netscape” for more information).
LoadIf the load is less than this specified amount, admit the session. The load threshold works best when a web application is processor-intensive.

 

To calculate the load threshold, do the following:

  1. Run the top command. Note the first listed “Load averages” and the percentage listed under “IDLE” of “Cpu states.

    Example 3-1 Sample Output from the top Command

    System: web_server           Wed Apr 22 10:41:59 1998
    Load averages: 1.45, 1.46, 1.78
    149 processes: 145 sleeping, 3 running, 1 stopped
    Cpu states:
    LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
    1.45 100.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0%
  2. If IDLE is greater than zero, then set the threshold to
    (100 - IDLE)/100.

    If IDLE equals zero, then set the threshold to the first listed load average.

    Using the above sample output, you would set the load threshold to 1.45.

Run top when performance is poor and acceptable to determine an acceptable load level.

End Sessions

For the default, the interval between requests is set to 600 seconds (10 minutes) and the session duration is disabled.

Table 3-2 HP WebQoS for Netscape Configurable Parameters: End Sessions

ParameterDescription
Interval between requestsThe amount of time, in seconds, between requests within the session. If the time between requests exceeds the specified threshold, the session is ended.
Session durationThe amount of time of the session. If the session exceeds the specified threshold, the session is ended. Set this parameter to zero to disable this threshold.

 

Respond to Rejected Sessions

Rejected sessions can either be redirected or served a web page containing a standard error message or other information.

If redirection is disabled or the redirect request is not accepted, a web page containing a standard error message or other information is returned.

The default is to disable redirection and serve an error page to a rejected session.

Table 3-3 HP WebQoS for Netscape Configurable Parameters: Redirect Rejected Sessions

ParameterDescription
DisableDo not redirect the rejected session. Instead, return a web page with an error message or other information.
AddressRedirect the rejected session to a load balancing system (such as a cluster manager), to another web server, or to another system set up to specifically handle rejected sessions. Specify the full domain name or IP address.
Cluster Redirect the rejected session to a randomly selected member of a cluster.
DomainRedirect the rejected session to the domain to which the systems in the cluster belong. For example, if the cluster consists of the two systems ww1.sales.acme.com and ww2.sales.acme.com, specify the domain as .sales.acme.com. Note the leading dot.

The domain specifies the scope over which the client-side cookies can be shared (HP WebQoS uses client-side cookies to encode session information).
GroupThe cluster group to which this system belongs.
TTLTime to Live. The number of redirections allowed before rejecting the session. Add one to the TTL parameter to get the number of redirects. For example, setting the TTL to 0 allows one redirection. Setting the TTL to 1 allows two redirections.

It is recommended that the TTL be set to a value no larger than 2.

 

When redirection is disabled, the following types of web pages can be served:

Table 3-4 HP WebQoS for Netscape Configurable Parameters: Respond to Rejected Sessions

ParameterDescription
ErrorThe “Server Temporarily Unavailable” error message is served to rejected requests. This is the easiest but least informative way to respond to a rejected request. Extra load on the system may be generated by users trying to immediately re-establish a connection.
PageThe specified web page is served to rejected requests. You can provide information to the customer such as why the session was rejected and when would be a more opportune time to return to the site. A user is less likely to try immediately re-establishing a connection and more likely to return to the site.
Allocate sessionsA countdown web page is served to rejected requests. The user is asked to wait a certain amount of time before getting access to the site. This type of session is given priority over new sessions.

Enter the number of sessions you wish to have admitted each minute. For example, if you allocate five sessions per minute, one session will be admitted every 12 seconds. If seven sessions are rejected, five will be admitted the next minute and two will be admitted the minute after. Make sure the allocation rate is less than the system's capacity.

You may want to compensate the allocation for no-shows.

Monitoring the % Priority Requests statistic will show the system's load due to priority sessions. Reduce the allocation rate if the number approaches or is over 50%.

Also monitor the Last Allocation Delay statistic. It shows how long a deferred user waited before his/her session was admitted.
ExternalUse an external function or application. For example, the user could be offered a discount or other incentive to return to the site; or, the user could be offered to enroll in a service plan that guarantees access to the site. Currently, no supported functions or applications exist. If selected, the Error page is returned.
ExcludeAfter the initial rejection, the user is prevented from returning to the site after the specified amount of time (in seconds). This discourages a user from trying to immediately re-establish a connection.

If a session is allocated, this is the minimum delay that can be scheduled.

 

Creating an Allocation Page for Rejected Sessions

The following is the default allocation page served to the user:

Example 3-2 Server Busy

We are sorry our server is busy, and in order to ensure adequate levels of service to our current visitors, we cannot serve you at this time. We have allocated you a position in line and will serve you as soon as we can.
You will automatically enter the site in 1:23 (minutes:seconds).

To change the content of this page, you must edit the file /opt/ns-server_name/server_id/config/hpac/config.ac

To change the “Server Busy” title, edit the deferral.title parameter. To change the content of the message, edit the deferral.message parameter. To edit the countdown line, edit the deferral.enterMsg parameter. Note that each parameter is ended by a single period on its own line.

The default allocation page would include the following entries in the config.ac file:

deferral.title
Server Busy
.
deferral.message
We are sorry our server is busy, and in order to ensure adequate levels of service to our current visitors, we cannot serve you at this time. We have allocated you a position in line and will serve you as soon as we can.
.
deferral.enterMsg
You will automatically enter the site in
.

Starting HP WebQoS for Netscape

HP WebQoS is enabled after you have installed it (provided you have met certain conditions; see “Configuring HP WebQoS for Netscape” for more information) or run the setup script (see “Running the Setup Script” for more information).

If you have stopped HP WebQoS, then you can start it again by configuring and specifying the load from the HP WebQoS Settings administration web page.

Stopping HP WebQoS for Netscape

To stop or disable HP WebQoS, set the Admit Session to “Always” from the HP WebQoS Settings administration web page.

If you are permanently stopping HP WebQoS, you should remove HP WebQoS from your system (see “Removing HP WebQoS for Netscape” below for more information). Because HP WebQoS does not cache HTML, performance may be slow for static pages.

Removing HP WebQoS for Netscape

To remove HP WebQoS, do the following:

  1. Type /opt/webqospk/setup.nes -r

  2. At the Enter root pathname of Netscape server prompt, enter the Netscape Server root directory.

You can also use the /opt/webqospk/setup script which prompts you for the type of web server (Netscape or Zeus) you want to remove.

Logging HP WebQoS Information

Saving HP WebQoS Information

HP WebQoS decisions can be saved to the server access log. To include them, do the following:

  1. Start the Netscape Administration Server.

  2. Select the server to configure.

  3. Click on Server Status.

  4. Select Log Preferences.

  5. Enter the name of the new access logfile to create (Netscape will not let you change the format of a logfile that is in use).

  6. Select Custom format near the bottom of the page.

  7. Append %Req->vars.hpacSessionState% at the end of the Custom format field. Be sure to include a space at the beginning of this entry to separate it from the other entries.

  8. Click OK to make the change.

  9. Click on Save and Apply to save your changes.

One of the following values will be logged to the access logfile:

Table 3-5 HP WebQoS Decision Log Values

ValueDescription
-A management request was served from the cache.
2The request was rejected.
3The request was processed as part of a basic priority session.
4The request was processed as part of a high priority session.
5The request was deferred to a future time slot.
6The request was redirected to another server.

 

Logging Statistics to a File

The statistics displayed on the HP WebQoS Statistics web page can be logged to a file. To log the statistics to a file add the following lines to /opt/ns-server_name/server_id/config/hpac/config.ac:

log.file filename
log.interval seconds

Where filename is the name of the file to which to save the statistics and seconds is how often the statistics are saved (in seconds). The log.interval default is 60 seconds.

Restart the web server for the changes to take effect.

The following is an example of a log entry: 10/Mar/1998:20:39:00,15,0,0,0,0,0,0,0,181,0,0,0.5,0.00,92 where each field is delimited by a comma. The fields are:

Table 3-6 HP WebQoS Log File Statistics

Statistic NameExample Value
Time (GMT)10/Mar/1998:20:39:00
Basic Sessions15
Priority Sessions0
Redirected Sessions0
Sessions Rejected0
Sessions Rejected Again0
Sessions Timed Out0
Sessions Too Long0
Bad MD5 Requests0
Basic Requests181
Priority Requests0
Management Requests0
Load0.5
Percentage Priority Requests0.00
Last Allocation Delay92

 

Other Configuration Considerations

This section covers tasks beyond basic configuration.

Tuning Your Web Server's Cache

To control session admissions, HP WebQoS tracks the session state by including cookies in HTTP responses. For HP WebQoS to operate effectively, the server cannot generate all of its responses from the cache. This may cause the performance of the web server to be slow.

However, you can tune the cache by configuring the /opt/ns-server_name/server_id/config/hpac/config.ac file to allow specified mime types to be cached or not cached.

For example, if you serve HTTP pages with embedded images, you can cache the images by adding the following lines to the configuration file:

mime.cache
mime.type image/gif
mime.type image/jpeg

Or, if your pages are generated by an application such as an NSAPI plug-in or CGI script, you can allow all mime types to be cached except for the mime types associated with the application. For example, to cache all mime types except those generated by CGI scripts, add the following lines to the configuration file:

mime.nocache
mime.type magnus-internal/cgi

You must restart the web server if you make changes to the configuration file.

If a page is not cachable, such as a dynamically created page or other pages marked by NSAPI as uncachable, you cannot cache it even if you specify it in the configuration file as cachable.

Allowing Equal Access to a System's Resources

If a web server hosts multiple virtual web sites, HP WebQoS can be configured to balance traffic between each site, allowing each site to share the system's resources equally.

The description or pattern of the web servers' document roots for each virtual server must be configured in the /opt/ns-server_name/server_id/config/hpac/config.ac configuration file. HP WebQoS uses the isolate.pattern parameter to monitor each site's traffic. You must restart the web server after editing the configuration file.

For example, a system is hosting two web sites for Company A and Company B. Company A's home page is located at /web_pages/company_a/index.html and Company B's home page is located at /web_pages/company_b/index.html. To monitor each site's traffic, add the following to the configuration file:

isolate.pattern /web_pages/%[^/]

Refer to documentation on the sscanf command for more information on constructing the pattern.

After editing the configuration file, restart the web server.

Detecting Failed Servers in a Cluster

When a web server is running, it periodically broadcasts a message that it is up. When a web server is shut down, it broadcasts a message that is unavailable. When a web server is not running, it does not broadcast a message.

Each web server in a cluster listens for these broadcast messages. Based on the messages received or not received, it will mark each system as up or down.

The web server marks a system as up when it receives the appropriate broadcast message from that system. The web server marks a system as down when it receives the appropriate message or it fails to receive a message after a specified number of broadcast intervals.

In the HP WebQoS /opt/ns-server_name/server_id/config/hpac/config.ac configuration file, you can configure how often messages are sent (broadcast interval) and how many messages can be missed before the system is marked as down. The parameters are:

cluster.keepalive.interval 60
cluster.keepalive.misses 3

where the interval is measured in seconds. The values given are the default values.

If you configure these parameters, the web server must be restarted. Also, all systems in the cluster should use the same values for these parameters.

Decreasing the broadcast interval decreases the time it takes to detect a failure. However, it also increases broadcast traffic.

Sometimes, not all broadcast messages are received. Therefore, the number of misses should be set to a value greater than one. However, in a large cluster, removing a machine falsely does not severely impact the cluster's capacity and improves the responsiveness to failures.

The maximum time to detect a failure can be determined by multiplying the broadcast interval by the number of misses. For the default values, the maximum failure detection time is three minutes.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2000 Hewlett-Packard Development Company, L.P.