Oracle Web Cache Administration and Deployment Guide Release 1.0.2.3 Part Number A86722-03 |
Library | Service | Contents | Index

# 5
Initial Setup and Configuration

This chapter describes the steps to initially configure Oracle Web Cache to begin caching application Web server content after installation.

This chapter contains these topics:

- Task 1: Start Oracle Web Cache

- Task 2: Modify Security Settings

- Task 3: Set Resource Limits

- Task 4: Specify Web Site Settings

- Task 5: Specify Caching Rules

- Task 6: Restart Oracle Web Cache

## Task 1: Start Oracle Web Cache

To start Oracle Web Cache to begin initial configuration:

1. If not currently logged on to the Oracle Web Cache computer, log in with the user ID of the user that performed the installation.

2. Start Oracle Web Cache. From the command line, enter:

       webcachectl start

## Task 2: Modify Security Settings

When Oracle Web Cache is first installed, it is set up with default passwords for administration and invalidation. In addition, the computer on which you installed Oracle Web Cache is the default trusted host.

To change the security settings:

1. Start Oracle Web Cache Manager.

   See Also: "Starting Oracle Web Cache Manager"

2. Change the password for the administrator. Configuration and operational tasks can be performed with the Oracle Web Cache `administrator` user. The `administrator` user has a default password of `administrator` set up during installation. Before you begin configuration, change the default password to a secure password.

   1. In the navigator pane, select Administering Oracle Web Cache > Security.

      The Security page appears in the right pane.

   1. In the Security page, choose Change Admin Password under Administration User.

      The Change Administration User Password dialog box appears.

   2. Enter `administrator` in the Old Password field and a new password between four and 10 characters in the New Password and Confirm New Password fields.

   3. Choose Submit.

3. Optionally, change the password for the invalidation administrator. The invalidation administrator has a user ID of `invalidator`, whose default password of `invalidator` is set up during installation.

   1. In the Security page, choose Change Invalidation Password under the Invalidation User.

      The Change Invalidation User Password dialog box appears.

   1. Enter `invalidator` in the Old Password field, and a new password between four and 10 characters in the New Password and Confirm New Password fields.

   2. Choose Submit.

4. Optionally, change the trusted subnet or trusted host from which Oracle Web Cache and invalidation administration can take place. By default, the computer on which you installed Oracle Web Cache is the trusted host.

   1. In the Security page, choose Change Trusted Subnets under the Currently trusted subnets.

      The Change Trusted Subnets dialog box appears.

   1. Select one of the following options:

      All subnets

      Select to allow administration requests from all computers in all the subnets in the network.

      This machine only

      Select to allow administration and invalidation requests from only this computer.

      Enter list of IPs

      Select to allow administration and invalidation requests from all IP addresses you enter in a comma-separated list.

   2. Choose Submit.

5. Optionally, change the user ID and group ID for the Oracle Web Cache executables on UNIX. By default, the user that performed the installation is the owner of Oracle Web Cache executables. Only this can user can exceute `webcachectl start|stop` commands.

   1. In the navigator pane, select Administering Oracle Web Cache > Process Identity.

      The Process Identity page appears in the right pane.

   1. In the Process Identity page, choose Change IDs.

      The Change Process Identity dialog box appears.

   2. Enter the new user in the New User ID field and the group ID of the user in the New Group ID field.

   3. Choose Submit.

6. In the Oracle Web Cache Manager main window, choose Apply Changes.

## Task 3: Set Resource Limits

When the maximum cache memory limit is reached, Oracle Web Cache performs garbage collection. During garbage collection, Oracle Web Cache removes the less popular and less valid documents from the cache in favor of the more popular and more valid documents.

To avoid swapping documents in and out of the cache, it is crucial to configure enough memory for the cache. By default, the memory limit is set to 500 MB, which is sufficient for most caches. To acquire a rough estimate of the memory required for the cache, use the following formula:

    (average HTTP object size) * (maximum number of objects you want to cache)

For example, if you want to cache 10,000 objects and the average the size of those objects is 3 KB, then the maximum cache size limit should be set to at least 30 MB.

When setting the maximum memory usage limit, Oracle Corporation recommends setting the limit as close to the operating system's resource limit as possible. If necessary, resize the operating system's resource limit.

Note: Most operating systems have a 2 GB memory limit.

The size and maximum number of Web objects, such as GIF, HTML, or PDF, can be determined by:

- Application Web server's access log files

- Simple shell scripts

- Third-party tools

In addition to the cache size, it is also important to specify the expected load on the Oracle Web Cache server. The expected load is the sum of the maximum number of incoming open connections to the Oracle Web Cache server and the number of outgoing open connections to the application Web servers. When you configure this limit, set a reasonable number. If you set a number that is too high, performance can be affected. To help you determine the number, you can use various tools available for your operating system. For example, the `netstat` command on UNIX enables you to determine the number of established connections.

Note: Sun Solaris release 2.6 can have no more than 1,000 connections. Sun Solaris release 2.7 or higher can have up to 65,000.

See Also: Operating system specific documentation for connection limitations Oracle Internet Application Server 8i Oracle HTTP Server powered by Apache Performance Guide for TCP/IP performance tuning tips

To set resource limits:

1. Start Oracle Web Cache Manager.

   See Also: "Starting Oracle Web Cache Manager"

2. Set the maximum cache size:

   1. In the navigator pane, select Administering Oracle Web Cache > Resource Limits.

      The Resource Limits page appears in the right pane.

   1. In the Resource Limits page, choose Change cache size limit.

      The Change Maximum Cache Size dialog box appears.

   2. In the New maximum cache size, enter the new cache size.

   3. Choose Submit.

3. Set the maximum incoming connections:

   1. In the Resource Limits page, choose Change connections limit.

      The Change Maximum Incoming Connections Limit dialog box appears.

   1. In the New maximum connections limit field, enter the new limit.

   2. Choose Submit.

4. In the Oracle Web Cache Manager main window, choose Apply Changes.

## Task 4: Specify Web Site Settings

For Oracle Web Cache to act as a virtual server for a Web site, configure Oracle Web Cache with information about the Web site, including the host names of the application Web servers. In addition, specify a listening port from which Oracle Web Cache can receive browser requests.

To configure Oracle Web Cache with Web site information:

1. Start Oracle Web Cache Manager.

   See Also: "Starting Oracle Web Cache Manager"

2. Configure the application Web servers for the Web site:

   1. In the navigator pane, select Administering Web Sites > Application Web Servers.

      The Application Web Servers page appears in the right pane.

   1. In the Application Web Servers page, choose Add.

      The Edit/Create Application Web Server page dialog box appears.

   2. In the Hostname field, enter the host name of the application Web server.

   3. In the Port field, enter the listening port from which the application Web server will receive Oracle Web Cache requests.

   4. In the Capacity field, enter the number of concurrent connections that the application Web server can sustain.

      When you set the capacity, it assigns a weighted load percentage to the application Web server. The load specifies the percentage of requests that this application Web server will handle. The load percentage is calculated from the following formula:

          application Web server capacity / combined capacity

      For example, if one application Web server has a capacity of 50 and a second application Web server has a capacity of 40 for a total capacity of 90, then the first server is assigned a load percentage of 55 and the second server is assigned a load percentage of 45.

          50/90 = 55%
          40/90 = 45%

      If this is the only application Web server, the load will be 100 regardless of the capacity.

      The maximum number of concurrent connections that an application Web server can handle is determined by load testing the application Web server until it runs out of CPU, responds slowly, or until a backend database reaches full capacity.

   5. In the Failover Threshold field, enter the number of allowed continuous request failures before Oracle Web Cache will consider the application Web server down. The default is five requests.

      If an application Web server fails any time after Oracle Web Cache has started to send a request, then Oracle Web Cache increments the failure counter. The failure counter is reset in the event of a successful application Web server response. A request is considered failed if:

      - There are any network errors

      - The HTTP response status code is either less than 100, or is one of the 500 (Internal Server Error), 502 (Bad Gateway), 503 (Service Unavailable), or 504 (Gateway Timeout) messages

      Once the threshold is met, Oracle Web Cache considers the application Web server down and uses other application Web servers for future requests. When an application Web server is down, Oracle Web Cache starts polling the application Web server. It does this by sending requests to the URL specified in the Ping URL field. When Oracle Web Cache is able to successfully get a response from the application Web server without any network errors and the HTTP response code is not less than 100, or equal to 500, 502, 503, 504, it considers that application Web server live again and uses it for future requests.

      Note: The threshold does not apply if Oracle Web Cache cannot connect to an application Web server. In this case, Oracle Web Cache immediately considers the application Web Cache down and does not use it for future requests. The failover to other live application Web servers does not apply if there is only one live application Web server left.

   6. In the Ping URL field, enter the URL that Oracle Web Cache will use to poll an application Web server that has reached its failover threshold.

   7. In the Ping Interval (seconds) field, enter the time in seconds that Oracle Web Cache will poll an application Web server that has reached its failover threshold. The default is 10 seconds.

   8. Choose Submit.

3. Optionally, configure an additional listening port from which Oracle Web Cache will receive browser requests.

   Oracle Web Cache listens on port 1100 by default. It may be necessary to add an additional listening port if you want to assign Oracle Web Cache a port that an application Web server was previously listening on.

   1. In the navigator pane, select Administering Web Sites > Oracle Web Cache Listen Ports.

      The Oracle Web Cache Listen Ports page appears in the right pane.

   1. In the Oracle Web Cache Listen Ports page, choose Add.

      The Edit/Create Oracle Web Cache Listen Ports page dialog box appears.

   2. In the Oracle Web Cache IP Address field, enter the IP address of the computer running Oracle Web Cache.

   3. In the Oracle Web Cache Listen Port field, enter the listening port from which Oracle Web Cache will receive Web browser requests for the Web site. Ensure this port number is not already in use.

   4. Choose Submit.

4. In the Oracle Web Cache Manager main window, choose Apply Changes.

## Task 5: Specify Caching Rules

Specify the URLs containing the documents you want Oracle Web Cache to cache.

See Also: "Configuring Cacheability Rules"

## Task 6: Restart Oracle Web Cache

When Oracle Web Cache is configured, stop it and start it again to read in the new configuration settings. You can stop and start Oracle Web Cache using either Oracle Web Cache Manager or the `webcachectl` utility on the computer on which Oracle Web Cache software is installed and configured:

Use Oracle Web Cache Manager... | Use the webcachectl Utility...
--- | ---
Start Oracle Web Cache Manager. See Also: "Starting Oracle Web Cache Manager" In the navigator pane, select Administering Oracle Web Cache > Web Cache Operations. The Oracle Web Cache Operations page appears in the right pane. In the Oracle Web Cache Operations page, choose Stop and then Start. | From the command line, enter: `webcachectl stop` `webcachectl start`

| Copyright © 1996-2001 Oracle Corporation. All Rights Reserved. |
Library | Service | Contents | Index