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 4 HP WebQoS Peak for the Zeus Web Server

Configuring HP WebQoS for Zeus

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

You must install the Zeus web server before you run the setup script. If you re-install the Zeus web server, you must re-run the setup script.

The setup script configures and enables WebQoS for all virtual servers. The setup script enables NSAPI and HTACCESS for each virtual server and creates the necessary directory and configuration files for NSAPI. The Zeus NSAPI process user and group are the same as those configured for the Zeus web server (which were configured when you initially installed the Zeus web server).

Running the setup.zeus Script

To run the setup script, as user root, type the following:

  • cd /opt/webqospk
    ./setup.zeus [-p]

The -p option automatically configures the user (hpacadmin) and password (hpacadmin) of the HP WebQoS Settings administration web page for each virtual server. If the -p option is not specified, you are prompted to enter the user and password for the HP WebQoS Settings administration web page for each virtual server.

If you specify the -p option, HP recommends that you change the password. Refer to “Changing the Password of the HP WebQoS Settings Administration Web Page” in this section for more information.

While running the setup script, at the Root pathname of Zeus server prompt, enter the Zeus home directory (the default is /usr/local/zeus).

The setup script automatically configures and enables HP WebQoS.

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

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.

Example

The following is an example of running the setup.zeus script. In this example, the Zeus web server is installed in the default /usr/local/zeus home directory and two virtual servers (server1 and server2) have been configured. User input is in bold. Note that when the password is entered, it does not appear on the screen.

#cd /opt/webqospk
#./setup.zeus
Root pathname of Zeus server (/usr/local/zeus):
Updating server server1 at /usr/local/zeus/ns-config/https-server1 ...
Enter admin name for HP WebQoS Peak Configuration. (hpacadmin): admin1
Choose a password for admin1:
Enter the password again:
VirtualServer server1 - Success
Successful stop on backend machine localhost
VirtualServer server1 - Success
Successful start on backend machine localhost
Updating server server2 at /usr/local/zeus/ns-config/https-server2 ...
Enter admin name for HP WebQoS Peak Configuration. (hpacadmin): admin2
Choose a password for admin2:
Enter the password again:
VirtualServer server2 - Success
Successful stop on backend machine localhost
VirtualServer server2 - Success
Successful start on backend machine localhost
#

Changing the Password of the HP WebQoS Settings Administration Web Page

To change the default password (hpacadmin) configured by the setup script, for each virtual server, type
$ZEUSHOME
/web/bin/htpasswd doc_root/hpac/adminfile hpacadmin new_password

where $ZEUSHOME is the Zeus home directory (the default is /usr/local/zeus), doc_root is the documentation root of the virtual server for which you are changing the password, hpacadmin is the name of the user whose password is being changed, and new_password is the new password assigned to the user.

For example, if you want to change the password of the hpacadmin user of virtual server server1 to qosserver1 and the Zeus home directory is /usr/local/zeus and the documentation root is /webpages/server1, type the following: /usr/local/zeus/web/bin/htpasswd /webpages/server1/hpac/adminfile hpacadmin qosserver1

If the user does not exist in adminfile, it is added to the file. Otherwise, the existing password for the user is overwritten.

If you want to modify the user, you can edit adminfile. However, you must use htpasswd to modify the password.

You must have write permission for adminfile in order to change the password using the htpasswd command.

Setting the HP WebQoS Configurable Parameters for Zeus

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:port_number/hpac. Your Zeus server must be running to access this page. Use the username and password you configured (either from the setup script or by using the htpasswd command) to access this page. Select Control to get to the Settings administration web page.

  • You can edit the configuration file $ZEUSHOME/ns-config/https-server_name/config/hpac/config.ac

    Refer to “HP WebQoS Configurable Parameters for Zeus” for a list of the available configurable parameters for the Zeus 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 Zeus” for a list of the available configurable parameters for the Zeus 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 4-1 HP WebQoS for Zeus 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 Zeus” 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 4-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 4-2 HP WebQoS for Zeus 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 4-3 HP WebQoS for Zeus 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 4-4 HP WebQoS for Zeus Configurable Parameters: Respond to Rejected Sessions

ParameterDescription
ErrorThe “Error 503 Service 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 4-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 $ZEUSHOME/ns-config/https-server_name/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 Zeus

HP WebQoS is enabled after you have installed it (provided you have met certain conditions; see “Configuring HP WebQoS for Zeus” for more information) or run the setup script (see “Running the setup.zeus 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 Zeus

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 Zeus” below for more information).

Removing HP WebQoS for Zeus

You can remove HP WebQoS from one to all virtual servers.

To remove HP WebQoS from one or more virtual servers, do the following:

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

  2. At the Root pathname of Zeus server prompt, enter the Zeus home directory.

  3. For each virtual server, you are prompted to remove HP WebQoS from it. Enter y to remove HP WebQoS from it or n to keep HP WebQoS installed on it.

To remove HP WebQoS from all virtual servers, do the following:

  1. Type /opt/webqospk/setup.zeus -R

  2. At the Root pathname of Zeus server prompt, enter the Zeus home 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.

Example

The following is an example of removing HP WebQoS from one of two virtual servers configured on the system (remove HP WebQoS from server2; keep HP WebQoS installed on server1). The web server is installed in the default /usr/local/zeus directory. User input is in bold.

#cd /opt/webqospk
#setup.zeus -r
Root pathname of Zeus server (/usr/local/zeus):
Remove AdmissionController from server server1 (y or n): n
Remove AdmissionController from server server2 (y or n): y
Uninstall HP WebQOS Peak for server server2 at /usr/local/zeus/ns-config/https-server2
Done.
#

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 $ZEUSHOME/ns-config/https-server_name/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 $ZEUSHOME/ns-config/https-server_name/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 $ZEUSHOME/ns-config/https-server_name/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.