Skip Headers

Oracle9iAS Web Cache Administration and Deployment Guide
Release 2 (9.0.2)

Part Number A95404-02
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

6
Initial Setup and Configuration

This chapter describes the steps to initially configure Oracle9iAS Web Cache to begin caching content. It also provides instructions for configuring multiple origin servers and a cache cluster.

This chapter contains these topics:

Setting Up Oracle9iAS Web Cache

To set up Oracle9iAS Web Cache, perform the following tasks:

Task 1: Start Oracle9iAS Web Cache and the Oracle9iAS Web Cache Manager

To start Oracle9iAS Web Cache Manager to begin initial configuration:

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

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

    webcachectl start
    
    
  3. Start Oracle9iAS Web Cache Manager.

    See Also:

    "Starting Oracle9iAS Web Cache Manager"

Task 2: Modify Security Settings

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

To change the security settings:

  1. Change the password for the administrator.

    Configuration and operational tasks can be performed with the Oracle9iAS 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 General Configuration > Security.

      The Security page appears.

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

      The Change Administration User Password dialog box appears.

    3. Enter administrator in the Old Password field and a new password between four and 20 characters long in the New Password and Confirm New Password fields.

    4. Choose Submit.

  2. 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.

    2. Enter invalidator in the Old Password field, and a new password between four and 20 characters long in the New Password and Confirm New Password fields.

    3. Choose Submit.

  3. Optionally, change the trusted subnet or trusted host from which administration, invalidation, and statistics monitoring requests can take place.

    By default, the computer on which you installed Oracle9iAS 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.

    2. Select one of the following options:

      All subnets

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

      This machine only

      Select to allow requests from only this computer.

      Enter list of IPs

      Select to allow requests from all IP addresses you enter in a comma-separated list. You can enter IP addresses in one of the following formats:

    3. Choose Submit.

  4. Optionally, change the user ID and group ID for the Oracle9iAS Web Cache executables on UNIX.

    By default, the user that performed the installation is the owner of Oracle9iAS Web Cache executables. This user can execute webcachectl commands. Users that belong to the same group ID of the user that performed installation can also execute webcachectl commands.

    To change the user ID and group ID for the Oracle9iAS Web Cache executables on UNIX:

    1. In the navigator pane, select Cache-Specific Configuration > Process Identity.

      The Process Identity page appears.

    2. In the Process Identity page, select a cache for which to modify settings, and then choose Change IDs.

      The Change Process Identity dialog box appears.

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

    4. Choose Submit.

    5. Manually change the ownership of the following files and directories to the new user ID and group ID with the chown command:

      • $ORACLE_HOME/webcache

      • $ORACLE_HOME/webcache/internal.xml

      • $ORACLE_HOME/webcache/internal_admin.xml

      • $ORACLE_HOME/webcache/webcache.xml

      • $ORACLE_HOME/webcache/logs/event_log

      • $ORACLE_HOME/webcache/logs/access_log

  5. In the Oracle9iAS Web Cache Manager main window, choose Apply Changes.


    Note:

    If you changed any of the security settings, you must restart the admin server process from the webcachectl utility rather than with the Restart option in the Operations page (Administration > Operations). See "Task 12: Apply Changes and Restart Oracle9iAS Web Cache".


    See Also:

    "Administrator Password in the Change Administration Password Dialog Box"

Task 3: Configure Oracle9iAS Web Cache with Listening Ports for Incoming Browser Requests

By default, Oracle9iAS Web Cache listens with the HTTP protocol on port 7777 and HTTPS on port 4443. If these ports are in use, then the installation procedure attempts to assign other port numbers from a range of possible port numbers.


Note:

The IP address for the default HTTP and HTTPS ports is set to ANY. Upon startup, Oracle9iAS Web Cache attempts to bind the ports to all IP addresses. If multiple instances of Oracle9iAS Web Cache are running on a multihomed host with multiple IP addresses, then change ANY to a specific IP address to avoid port conflicts in the Listening Ports page (Cache-Specific Configuration > Listening Ports.


It may be necessary to add an additional listening port if you want to assign Oracle9iAS Web Cache a port that an origin server was previously listening on.

To specify a listening port from which Oracle9iAS Web Cache can receive browser requests:

  1. In the navigator pane, select Cache-Specific Configuration > Listening Ports.

    The Listening Ports page appears.

  2. In the Listening Ports page, choose Add.

    The Edit Listening Ports page dialog box appears.

  3. From the list, select the cache for which to modify settings.

  4. In the IP Address field, enter the IP address of the computer running Oracle9iAS Web Cache.

  5. In the Port Number field, enter the listening port from which Oracle9iAS Web Cache will receive Web browser requests for the Web site.

    Ensure that this port number is not already in use.

  6. From the Protocol list, select either HTTP to accept HTTP browser requests on the port or HTTPS to accept HTTPS browser requests on the port.

    See Also:

    "Secure Sockets Layer (SSL) Support"

  7. If you selected HTTPS as the listening protocol, then enter the location of the wallet in the Wallet field.

    This wallet is used for browser requests for sites hosted by Oracle9iAS Web Cache.

    By default, wallets are stored in the following locations:

    • /etc/ORACLE/WALLETS/user_name on UNIX

    • %USERPROFILE%\ORACLE\WALLETS on Windows operating systems

    Oracle Corporation recommends entering the location, even if the default is being used.

    As long as each site is configured with a separate wallet, the Oracle9iAS Web Cache listening port can share the same wallet as specified in the Origin Server Wallet page (Cache-Specific Configuration > Origin Server Wallet).

  8. Choose Submit.

    See Also:

Task 4: Provide Directives to Oracle HTTP Server

At installation time, Oracle HTTP Server sets the httpd.conf file with the following directives that impact Oracle9iAS Web Cache:

For example:

##
## httpd.conf -- Apache HTTP server configuration file
##
...
Port 7777
Listen 7778
...
ServerName http_server.company.com
...
UseCanonicalName On
....

If you decide to disable Oracle9iAS Web Cache, then the Oracle HTTP Server administrator must modify the value of the Port directive to the same value set for the Listen directive. For example:

##
## httpd.conf -- Apache HTTP server configuration file
##
...
Port 7778
Listen 7778
...
ServerName http_server.company.com
...
UseCanonicalName On
....

If Oracle9iAS Web Cache is deployed on a separate computer from the Oracle HTTP Server, then the Oracle HTTP Server administrator must modify the ServerName directive in httpd.conf for each site hosted by Oracle9iAS Web Cache. This will enable Oracle HTTP Server to redirect URLs to Oracle9iAS Web Cache. The following example shows httpd.conf modified to direct requests for www.1st.company.com and www.2nd.company.com to Oracle9iAS Web Cache, which listening on port 7777.

Port 7777
Listen 7778
...
ServerName  www.1st.company.com
ServerName  www.2nd.company.com
...
UseCanonicalName On
....

The httpd.conf file resides in $ORACLE_HOME/Apache/Apache/conf/httpd.conf on UNIX or ORACLE_HOME\Apache\Apache\conf\httpd.conf on Windows.

See Also:

Oracle HTTP Server Administration Guide

Task 5: Configure Oracle9iAS Web Cache with Operations Ports

In addition to receiving HTTP and HTTPS browser requests, Oracle9iAS Web Cache also receives administration, invalidation, and statistics monitoring requests on specific HTTP or HTTPS listening ports:

http://web_cache_hostname:http_port 
https://web_cache_hostname:https_port 

By default, Oracle9iAS Web Cache uses the HTTP protocol to receive these requests. Default HTTP port numbers are as follows:

To change the default port number or protocol for administration, invalidation, or statistics monitoring requests:

  1. In the navigator pane, select Cache-Specific Configuration > Operations Ports.

    The Operations Ports page appears.

  2. Select the cache for which to modify port and protocol settings.

  3. In the Operations Ports page, choose Edit.

    The Edit Operations Port dialog box appears.

  4. In the ADMINISTRATION, INVALIDATION, or STATISTICS row, perform the following:

    1. Enter the new port in the Port Number field.

    2. From the Protocol list, select either HTTP or HTTPS to accept requests.

    3. If you selected HTTPS, then enter the location of the wallet in the Wallet field.

      This wallet is used for administration, invalidation, and statistics monitoring HTTPS requests to Oracle9iAS Web Cache.

      By default, wallets are stored in the following locations:

      • /etc/ORACLE/WALLETS/user_name on UNIX

      • %USERPROFILE%\ORACLE\WALLETS on Windows operating systems

      Oracle Corporation recommends entering the location, even if the default is being used.

      As long as each site is configured with a separate wallet, these ports can share the same wallet as specified in the Listening Ports page (Cache-Specific Configuration > Listening Ports) and the Origin Server Wallet page (Cache-Specific Configuration > Origin Server Wallets).

  5. Choose Submit.

    See Also:

    Notes:

    • Requests to the administration port must originate from a trusted host or a host on a trusted subnet. Trusted hosts and subnets are defined in the Security page (General Configuration > Security). See "Task 2: Modify Security Settings" for further information.

    • If you changed any of the operations ports, you must restart the admin server process from webcachectl utility rather than with the Restart option in the Operations page (Administration > Operations). See "Task 12: Apply Changes and Restart Oracle9iAS Web Cache".

Task 6: Configure Auto-Restart Process Settings

The auto-restart process checks that the cache server process is running and automatically restarts the cache server process if it is not running.


Note:

On Windows, the cache server process is represented by the OracleHOME_NAMEWebCache service, and the auto-restart process is represented by the OracleHOME_NAMEWebCacheMon services.


If you enable auto-restart, then the auto-restart process polls the Oracle9iAS Web Cache server at specified intervals. It does this by sending requests to a specified URL. If it cannot connect to the cache server or if the cache server does not respond within a specified time, then the auto-restart process restarts the cache server process.

By default, auto-restart is not enabled.

To specify the settings for auto-restart:

  1. Start Oracle9iAS Web Cache Manager.

    See Also:

    "Starting Oracle9iAS Web Cache Manager"

  2. In the navigator pane, select General Configuration > Auto-Restart.

    The Auto-Restart page appears.

  3. To change the default settings, choose Edit.

    The Edit Auto-Restart dialog box is displayed.

  4. To enable Auto-Restart, select Enabled.

  5. In the Failover Threshold field, enter the number of consecutive failed requests before the auto-restart process considers the cache server to have failed. Only network errors, including timeout errors, are counted as failed requests.

    For each failed request, Oracle9iAS Web Cache increments the failure counter. When a request is successfully processed by the cache server, Oracle9iAS Web Cache resets the failure counter.

    When the failover threshold is met, the auto-restart process starts the cache server.


    Note:

    The threshold applies only to network errors and time-outs. If the cache server process is not running when the auto-restart process attempts to poll the cache server, the auto-restart process immediately restarts the cache server.


  6. In the Ping URL field, enter the URL that the auto-restart process will use to poll the cache server.

    Use a URL that you can guarantee is stored in the cache. The default is "/".

  7. In the Ping Interval field, enter the time, in seconds, between attempts by the auto-restart process to poll the cache server.

    The default value is 15 seconds.

  8. In the Ping Timeout field, enter the time, in seconds, that the auto-restart process will wait for a response from the cache server.

    The default value is 30 seconds.

  9. Choose Submit.

Task 7: Configure Network Time-outs

After Oracle9iAS Web Cache sends a response to a browser, the connection is left open for five seconds, which is typically enough time for the browser to process the response from Oracle9iAS Web Cache. If the network between the browser and Oracle9iAS Web Cache is slow, consider increasing the time-out. Likewise, there is a 3600 second network time-out between Oracle9iAS Web Cache and the origin server. If the origin server is unable to generate a response within that time, Oracle9iAS Web Cache sends a network apology page to the browser. If applications require a shorter time-out, then adjust the time-out.

To modify the default network time-outs:

  1. In the navigator pane, select Cache-Specific Configuration > Network Timeouts.

    The Network Timeouts page appears.

  2. In the Network Timeouts page, select the cache, and then choose Edit.

    The Edit Network Timeouts dialog box appears.

  3. In the Keep-Alive field, enter the time, in seconds, for Oracle9iAS Web Cache to keep a connection open to the browser after it has returned a response.

    If the time-out is set to 0, then the connection to the browser is not kept open. In addition, Oracle9iAS Web Cache sends the following response-header field in the response:

    Connection: Close
    
    
  4. In the Origin Server Timeout field, enter the time, in seconds, for the origin server to generate a response to Oracle9iAS Web Cache.

  5. Choose Submit.

    See Also:

    "Content-Length Request-Header Field"

Task 8: Set Resource Limits

To set resource limits for Oracle9iAS Web Cache, configure the following attributes:

Cache Memory

When the maximum cache memory limit is reached, Oracle9iAS Web Cache performs garbage collection. During garbage collection, Oracle9iAS Web Cache removes the less popular and less valid documents from the cache in favor of the more popular and more valid documents. In a cache cluster environment, Oracle9iAS Web Cache removes on-demand documents before it removes owned documents.

To avoid swapping documents in and out of the cache, it is crucial to configure enough memory for the cache. Generally, the amount of memory (maximum cache size) for Oracle9iAS Web Cache should be set to at least 256 MB. By default, the maximum cache size is set to 50 MB, which is sufficient only for initial post-installation testing.

To be more precise in determining the maximum amount of memory required, you can perform the following steps:

  1. Determine which documents you want to cache, how many are smaller than 4 KB and how many are larger than 4 KB. Determine the average size of the documents that are larger than 4 KB. Determine the expected peak load--the maximum number of documents to be processed concurrently.

    One way to do this is to look at existing Web server logs for one day to see which documents are popular. From the list of URLs in the log, decide which ones you want to cache. Retrieve the documents and get the size of each document.

  2. Calculate the amount of memory needed. The way you calculate it may differ depending on the version of Oracle9iAS Web Cache.

    For release 9.0.2, the amount of memory that Oracle9iAS Web Cache uses to store a document depends on whether the document is larger or smaller than 4 KB:

    • If a document is smaller than 4 KB, Oracle9iAS Web Cache uses a buffer of 4 KB to store the HTTP body.

    • If a document is 4 KB or larger, Oracle9iAS Web Cache uses buffers of 32 KB to store the HTTP body. For example, if a document is 40 KB, Oracle9iAS Web Cache uses two 32 KB buffers to store the HTTP body.

    • Regardless of the size of the body, Oracle9iAS Web Cache uses 4 KB to store the HTTP response header.

    For release 9.0.2, use the following formula to determine an estimate of the maximum memory needed:

    ( X * ( 4KB + 4KB ) ) + ( Y * (( [m/32] * 32KB ) + 4KB )) + basemem 
    
    

    In the formula:

    • X is the number of documents smaller than 4 KB.

    • 4KB is size of the buffer for the HTTP body for documents smaller than 4 KB.

    • 4KB is the size of the buffer for the HTTP response header.

    • Y is number of documents that are 4 KB or larger.

    • [m/32] is the ceiling of m (the average size, in kilobytes, of documents 4 KB or larger) divided by 32. A ceiling is the closest integer that is greater than or equal to the number.

    • 32KB is size of the buffer for the HTTP body for documents that are 4 KB or larger.

    • 4KB is the size of the buffer for the HTTP response header.

    • basemem is the base amount of memory needed by Oracle9iAS Web Cache to process requests. This amount includes memory for internal functions such as lookup keys and timestamps. The amount needed depends on the number of concurrent requests and on whether or not the requests include Edge Side Includes (ESI).

      For non-ESI requests, each concurrent request needs approximately 6 KB to 25 KB of memory. For example, to support 1000 concurrent requests, you need between 6 MB and 25 MB of memory.

      For ESI requests, each concurrent request needs approximately the following amount of memory:

      60KB + (number of ESI fragments * [6KB to 25KB])
      
      

      For example, for a document with 10 ESI fragments, use the following calculation:

      60KB + (10 * [6KB to 25KB]) = 120KB to 330KB
       
      

      That is, you need between 120 KB and 330 KB of memory for one 10-fragment document. To support 1000 concurrent requests, you need approximately between 120 MB to 330 MB of memory.

    For example, assume that you want to cache 5000 documents that are smaller than 4 KB and 2000 documents that are 4 KB or larger and that the larger documents have an average size of 54 KB. The documents do not use ESI. You expect to process 500 documents concurrently. Use the formula to compute the maximum memory:

    (5000 * (4KB + 4KB) ) + ( 2000 * (( [54/32] * 32KB ) + 4KB )) + (500 *[6KB to 25KB])
    
    

    Using the formula, you need:

    • 40,000 KB for the smaller documents.

    • 136,000 KB for the larger documents. For the HTTP body, you need 64 KB (two 32 KB buffers) for each document, given the average size of 54 KB. For the HTTP response header, you need 4 KB for each document.

    • 3,000 KB to 12,500 KB for the base amount of memory needed to process 500 concurrent requests.

    This results in an estimate of 179,000 KB to 188,500 KB of memory needed.


    Note:

    Even though you specify that certain documents should be cached, not all of the documents are cached at the same time. Only those documents that have been requested and are valid are stored in the cache. As a result, only a certain percentage of your documents are stored in the cache at any given time. That means that you may not need the maximum memory derived from the preceding formula.


  3. Configure Oracle9iAS Web Cache, specifying the result of the formula as the maximum cache size. Remember that the result is only an estimate.

    To specify the maximum cache size, perform the following steps:

    1. In the navigator pane, select Cache-Specific Configuration > Resource Limits.

    2. On the Resource Limits page, select the cache and choose Edit.

      The Edit Resource Limits dialog box appears.

    3. In the Maximum Cache Size field, enter the result of the formula.

    4. Choose Submit.

  4. After applying changes and restarting Oracle9iAS Web Cache, as described in "Task 12: Apply Changes and Restart Oracle9iAS Web Cache", use a simulated load or an actual load to monitor the cache to see how much memory it really uses in practice.

    Remember that the cache is empty when Oracle9iAS Web Cache starts. For monitoring to be valid, ensure that the cache is fully populated. That is, ensure that the cache has received enough requests so that a representative number of documents are cached.

    The Web Cache Statistics page provides information about the current memory use and the maximum memory use.

    To access the Web Cache Statistics page, from the navigator pane, select Administration > Monitoring > Web Cache Statistics. Note the following metrics in the Cache Overview table:

    • Size of Documents in Cache shows the current logical size of the cache. The logical size of the cache is the size of the valid documents in the cache. For example, if the cache contains two documents, one 3 KB and one 50 KB, the Size of Documents in Cache is 53 KB, the total of the two sizes. This metric does not show the physical size of the cache.

    • Configured Maximum Cache Size indicates the maximum cache size as specified in the Resource Limits page.

    • Current Allocated Memory displays the physical size of the cache. The physical size of the cache is the amount of data memory allocated by Oracle9iAS Web Cache for cache storage and operation. This number is always smaller than the process size shown by operating system statistics because the Oracle9iAS Web Cache process, like any user process, consumes memory in other ways, such as instruction storage, stack data, thread, and library data.

    • Current Action Limit is 90% of the Configured Maximum Cache Size. This number is usually larger than the Current Allocated Memory.

    If Current Allocated Memory is greater than Current Action Limit, Oracle9iAS Web Cache begins garbage collection. That is, Oracle9iAS Web Cache removes the less popular and less valid documents from the cache in favor of the more popular and more valid documents to obtain space for new HTTP responses without exceeding the maximum cache size.

    If the Current Allocated Memory is close to or greater than the Current Action Limit, increase the maximum cache size to avoid swapping documents in and out of the cache. Use the Cache-Specific Configuration > Resource Limits page to increase the maximum cache size.

Connection Limit

In addition to the cache size, it is also important to specify a reasonable number for the maximum connection limit for the Oracle9iAS Web Cache server. If you set a number that is too high, performance can be affected, resulting in slower response time. If you set a number that is too low, fewer requests will be satisfied. You must strike a balance between response time and the number of requests processed concurrently.

To help determine a reasonable number, consider the following factors:

Use various tools, such as those available with the operating system and with Oracle9iAS Web Cache, to help you determine the maximum number of connections. For example, the netstat -a command on UNIX and Windows operating systems enables you to determine the number of established connections; the ttcp utility enables you to determine how fast a page is processed. Oracle9iAS Web Cache Manager provides statistics on hits and misses.

To set the maximum number of incoming connections, perform the following steps:

  1. In the navigator pane of Oracle9iAS Web Cache Manager, select Cache-Specific Configuration > Resource Limits.

  2. In the Resource Limits page, select the cache and choose Edit.

    The Edit Resource Limits dialog box appears.

  3. In the Maximum Incoming Connections field, enter the new value.

  4. Choose Submit.

Do not set the value to an arbitrary high value, because Oracle9iAS Web Cache sets aside some resources for each connection, which could adversely affect performance. For many UNIX systems, 5000 connections is usually a reasonable number.

Connections on UNIX

On most UNIX platforms, each client connection requires a separate file descriptor. Oracle9iAS Web Cache tries to reserve the maximum number of file descriptors (Max_File_Desc) when it starts. As long as webcachectl can run as root, you can change this number to a higher one. For example, on Sun Solaris, you can increase the maximum number of file descriptors by setting the rlim_fd_max parameter. If the webcachectl is not able to run as root, Oracle9iAS Web Cache server logs an error message and fails to start.

See Also:

For release 9.0.2, Oracle9iAS Web Cache uses the following formula to calculate the maximum number of file descriptors to be used:

Max_File_Desc = Curr_Max_Conn + Total_WS_Capacity + Outgoing_Cluster_Conn + 100
 

In the formula:

Connections on Windows

On Windows operating systems, the number of file handles as well as socket handles is limited only by available kernel resources, more precisely, by the size of paged and non-paged pools. However, the number of active TCP/IP connections is restricted by the number of TCP ports the system can open.

The default maximum number of TCP ports is set to 5000 by the operating system. Of those, 1024 are reserved by the kernel. You can modify the maximum number of ports by editing the Windows registry. Windows operating systems allow up to 65534 ports.

To change the default, you must add a new value to the following registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

Add a new value, specifying the following:

The total of the maximum number of incoming connections and cluster member capacity should not be set to a number greater than the number of TCP ports minus 1024. You set the maximum number of incoming connections using the Resource Limits page (Cache-Specific > Resource Limits) of the Oracle9iAS Web Cache Manager. You set the cluster member capacity using the Cluster Configuration page (Administration > Cluster Configuration).

On Windows operating systems, Oracle9iAS Web Cache does not attempt to reserve file handles or to check that the number of current maximum incoming connections is less than the number of TCP ports.

Task 9: Specify Settings for Origin Servers

Configure Oracle9iAS Web Cache with the application Web servers or proxy servers for which it sends cache misses. Typically, Oracle9iAS Web Cache uses application Web servers for internal sites and proxy servers for external sites protected by a firewall.

By default, the listening port and host name of the Oracle HTTP Server are configured. When Oracle9iAS Web Cache is installed, Oracle HTTP Server has a default listening HTTP port of 7778 and an HTTPS port of 4444.

Oracle9iAS Web Cache will only forward requests to a configured application Web server or proxy server if the server is mapped to a Web site in the Site to Server Mapping page (General Configuration > Site to Server Mapping).

To configure Oracle9iAS Web Cache with application Web server or proxy server information:

  1. In the navigator pane, select General Configuration > Application Web Servers or Proxy Servers.

    The Application Web Servers or Proxy Servers page appears.

  2. In the Application Web Servers or Proxy Servers page, choose Add.

    The Create Application Web Server or Create Proxy Server dialog box appears.

  3. In the Hostname field, enter the host name of the application or proxy server.

  4. In the Port field, enter the listening port from which the application or proxy server will receive Oracle9iAS Web Cache requests.

  5. In the Capacity field, enter the maximum number of concurrent connections that the application or proxy server can accept.

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

    In a cache cluster, Oracle9iAS Web Cache ensures that the total number of connections from all cluster members to the application Web server or proxy server does not exceed the Capacity. Each cluster member is allowed a percentage of the maximum connections, using the following formula:

    connections_from_each_cluster_member = capacity / number_of_cluster_members
    

    See Also:

    "Load Balancing" for information on how capacity is used in multiple application or proxy server configurations

  6. In the Failover Threshold field, enter the number of allowed continuous request failures before Oracle9iAS Web Cache considers the origin server down.

    The default is five requests.

    If a server fails any time after Oracle9iAS Web Cache has started to send a request, then Oracle9iAS Web Cache increments the failure counter. The failure counter is reset in the event of a successful 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 either 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable, or 504 Gateway Timeout messages

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


    Note:

    The threshold does not apply if Oracle9iAS Web Cache cannot connect to a server. In this case, Oracle9iAS Web Cache immediately considers the server down and does not use it for future requests. The failover to another server does not apply if there is only server left.


  7. In the Ping URL field, enter the URL that Oracle9iAS Web Cache will use to poll an origin that has reached its failover threshold.

    Rather than using a static URL, Oracle Corporation recommends using a URL that checks the health of the application logic on the origin server and returns the appropriate HTTP 200 or 500 status codes.

  8. In the Ping Interval (seconds) field, enter the time in seconds that Oracle9iAS Web Cache will poll an origin server that has reached its failover threshold.

    The default is 10 seconds.

  9. From the Protocol list, select either HTTP to send HTTP requests on the port or HTTPS to send HTTPS requests on the port.

    See Also:

    "Secure Sockets Layer (SSL) Support"

  10. Choose Submit.

  11. If you selected HTTPS as the listening protocol, then specify the location of the wallet for Oracle9iAS Web Cache communication to the application Web server or proxy server.

    This wallet manages Oracle9iAS Web Cache authentication data such as keys, certificates, and trusted certificates needed by the Secure Sockets Layer (SSL). By default, wallets are stored in the following locations:

    • /etc/ORACLE/WALLETS/user_name on UNIX

    • %USERPROFILE%\ORACLE\WALLETS on Windows operating systems

    Oracle Corporation recommends entering the location, even if the default is being used.

    To specify the wallet location:

    1. In the navigator pane, select Cache-Specific Configuration > Origin Server Wallet.

      The Origin Server Wallet page appears.

    2. In the Origin Server Wallet page, select the cache for which to modify wallet settings, and then choose Edit.

      The Edit Origin Server Wallet dialog box appears.

    3. In the Wallet Directory field, enter the location of the wallet in the Wallet field.

    4. Choose Submit.

Task 10: Configure Web Site Settings

For Oracle9iAS Web Cache to act as a virtual server for one or more Web sites, configure Oracle9iAS Web Cache with information about the Web site.

To configure settings for a Web site:

  1. Specify a site definition:


    Notes:

    • It may not be possible to specify a site definition for an external ESI provider site. If an ESI request is made to a provider that does not match any application Web server mapping, then Oracle9iAS Web Cache uses Domain Name System (DNS) to resolve the site name. Note that this will not work if there is a firewall between the cache and the ESI provider. In that case, you must provide a proxy server mapping that directs the request to the appropriate proxy.

      Undefined ESI provider sites disable the following Oracle9iAS Web Cache features:

      -- Performance assurance heuristics

      -- Origin server features, such as surge protection, load balancing, failover, and session binding

    • It is not possible to configure only ESI provider sites. In a configuration with ESI provider sites, at least one virtual host site definition must exist for ESI template pages.


    1. In the navigator pane, select General Configuration > Sites.

      The Site Definitions page appears.

    2. In the Site Definitions page, choose Add Site.

      The Add Site dialog box appears.

    3. In the Host Name field, enter the site name, such as www.company.com.

    4. In the Port Number field, enter the port number from which the Web site is listening for incoming HTTP requests.

      The port number should be the port used in browser requests.

    5. In the HTTPS Only Prefix field, enter the URL prefix for which only HTTPS requests will be served. If all traffic must be restricted to HTTPS, enter "/ " for the entire site.

    6. In the Default Site field, select Yes to specify the sites as the default site, or select No to specify this site as a nondefault site.

      If you select Yes for a site, another site that previously had the Yes setting will change to No.

      See Also:

      "Default Site Settings" for information about how the default site is used

    7. In the Create Alias from Site Name with/without www field, select either Yes or No.

      Many sites are represented by one or more aliases. Oracle9iAS Web Cache recognizes and caches requests for a site and its aliases. For example, site www.company.com:80 may have an alias of company.com:80. By specifying this alias, Oracle9iAS Web Cache caches the same content from either company.com:80 or www.company.com:80. If a request includes a site alias that is not configured, then Oracle9iAS Web Cache sends the request to the default site.

      • Select Yes to use the site name as a site alias.

        For example, if the site domain name is company.com, a site alias of www.company.com will be used. If the site domain name is www.company.com, a site alias of company.com will be used.

      • Select No if you do not want to use the site name as a site alias.

      If additional or other site aliases are used by site, continue to Step 2. Otherwise, skip to Step 3.

    8. Choose Submit.

  2. If the site uses additional aliases, map the site to those aliases.


    Important:

    To ensure requests are directed to the correct site, specify all possible variations of the site name. If a request includes a site alias that is not configured, then Oracle9iAS Web Cache sends the request to the default site.


    1. In the Site Definitions page, select a site, and then choose Add Alias.

      The Add Alias for Site dialog box appears.

    2. In the Host Name field, enter the site alias name, such as company.com.

    3. In the Port Number field, enter the HTTP or HTTPS port number from which the alias is listening for incoming HTTP requests.

      The port number should be the port used in browser requests.

  3. Map the site to the origin servers:

    1. In the navigator pane, select General Configuration > Site to Server Mapping.

      The Site to Server Mapping page appears.

    2. In the Site to Server Mapping page, choose Create if no mappings exist. If mappings already exist, select a mapping, and then choose Insert Above or Insert Below.

      The Create Site to Server Mapping or Edit/Add Site to Server Mapping dialog box appears.

    3. In the Edit Site Name section, select one of the following options:

    4. In the Select Origins Servers to which this Site is mapped, select one of the following options:

      • Select Application Web Servers to select application Web servers specified in the Application Web Servers page

      • Select Proxy Servers to select proxy servers specified in the Proxy Servers page

    5. In the Exclude section, select one of the following options to restrict Oracle9iAS Web Cache access to the origin servers for the sites specified in Edit Site Name.

      • ESI restricts Oracle9iAS Web Cache from using this mapping for ESI includes. Select this option if the site is a virtual host site that does not provide ESI content.

      • NON_ESI restricts Oracle9iAS Web Cache from using this mapping for any content that is not ESI. Select this option if the site is an ESI provider site.

      • NONE does not enforce any Oracle9iAS Web Cache restrictions. Select this option if the site is a virtual host site that supports ESI.

      For example, one mapping entry that uses Exclude ESI does not mean that Oracle9iAS Web Cache is not allowed to assemble ESI content from other origin servers.

    6. Choose Submit.

      The Edit/Add Site to Server Mapping dialog box closes.

    7. In the Site to Server Mapping page, select a mapping, and then choose Move Up or Move Down to order the mappings. Note the following:

  4. For configured sites, specify apology pages to be served from Oracle9iAS Web Cache for network communication errors, site busy errors, and ESI <esi:include> errors:

    1. In ORACLE_HOME/webcache/docs on UNIX and ORACLE_HOME\webcache\docs on Windows create apology pages.

      By default, Oracle9iAS Web Cache uses network_error.html for network errors and busy_error.html for site busy errors. For a production environment, Oracle Corporation advises that you modify the defaults or create entirely new apology pages. There is no default for ESI <esi:include> errors. If you plan to use ESI <esi:include> tags for partial page caching, then you must create an apology page. Create or modify existing apology pages in $ORACLE_HOME/webcache/docs on UNIX and ORACLE_HOME\webcache\docs on Windows.

    2. In the navigator pane, select General Configuration > Apology Pages.

      The Apology Pages page appears.

    3. Select a site, and then choose Edit.

      The Edit Apology Pages dialog box appears.

    4. In the Apology page for network error field, enter the file name of the apology page that will be delivered for network communication problems between Oracle9iAS Web Cache and the Web site.

      If you are using the default network_error.html page, leave the field as is.

    5. In the Apology page for site busy field, enter the file name of the apology page that will be delivered when a Web site is saturated with requests.

      If you are using the default busy_error.html page, leave the field as is.

    6. In the Apology page for partial page error field, enter the file name of apology page that will be delivered when Oracle9iAS Web Cache is unable to retrieve an HTML fragment for an <esi:include>.

      If you are not using <esi:include> tags for partial page caching or you want to use ESI language elements for exceptions, do not enter a value.

    7. Choose Submit.

      The Edit Apology Pages dialog box closes.

      See Also:

      "Exceptions and Errors" to understand how exceptions and error are handled for <esi:include> errors

Default Site Settings

For those requests that do not include a Host request-header field, Oracle9iAS Web Cache uses the default site settings to determine the appropriate site for the requests. Figure 6-1 shows the default site definition and site-to-server mappings.

The default site established during installation uses the host name and listening port of the computer on which the Oracle9i Application Web Server was installed. The default site-to-server mappings use the following rules:

Figure 6-1 Default Site Settings

Text description of setupa.gif follows
Text description of the illustration setupa.gif

Virtual Host Site Example Settings

A virtual host site named www.company.com without ESI content could have the following site definition and site-to-server mapping shown in Figure 6-2.

The site definition specifies www.company.com, port 80 as the site and company.com, port 80 as the site alias. The site-to-server rule maps requests to www.company.com to application Web server host-server, port 7778. The Exclude ESI setting restricts Oracle9iAS Web Cache from fetching ESI content from host-server, port 7778 for www.company.com:80.

Figure 6-2 Example: Site Settings for a Virtual Host Site

Text description of setup2.gif follows
Text description of the illustration setup2.gif

Figure 6-3 shows the site definitions and site-to-server mappings for virtual host sites www.1st.company.com and www.2nd.company.com that support ESI.

The site definition specifies www.1st.company.com, port 80 and www.2nd.company.com, port 80 as the sites, and 1st.company.com, port 80 and 2nd.company.com, port 80 as the site aliases. The site-to-server rules map sites matching www.*.company.com to application Web server host-server, port 7778. The Exclude NONE setting enables Oracle9iAS Web Cache to serve site content, as well as assemble ESI include fragments.

Figure 6-3 Example: Site Settings for Multiple Virtual Host Sites

Text description of setup3.gif follows
Text description of the illustration setup3.gif

ESI Provider Site Example Settings

ESI provider sites named www.providersite1.com and www.providersite2.com could have the following site definition and site-to-server mapping shown in Figure 6-4.

The site definition specifies www.providersite1.com, port 80 and www.providersite2.com, port 80 as the sites, and providersite1.com, port 80 and providersite2.com, port 80 as the site aliases. The site-to-server rules maps www.providersite1.com to proxy server proxy-host, port 80. The Exclude NON_ESI setting restricts Oracle9iAS Web Cache from using this mapping for any content which is not ESI. There is no mapping for www.providersite2.com, because the proxy server is not known. Instead, DNS will be used to resolve the site name to the appropriate server. In addition, other ESI provider sites that do not have site definitions will also be resolved through DNS.


Note:

This example only shows ESI provider site mappings. In an actual deployment, at least one virtual host definition must exist for ESI template pages.


Figure 6-4 Example: Site Settings for Multiple ESI Provider Sites

Text description of setup4.gif follows
Text description of the illustration setup4.gif

Task 11: Specify Caching Rules

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

See Also:

"Configuring Caching Rules"

Task 12: Apply Changes and Restart Oracle9iAS Web Cache

After Oracle9iAS Web Cache is configured, apply changes and restart Oracle9iAS Web Cache.

To apply changes, in the Oracle9iAS Web Cache Manager main window, choose Apply Changes.

To restart Oracle9iAS Web Cache, use either Oracle9iAS Web Cache Manager or the webcachectl utility on the computer on which Oracle9iAS Web Cache software is installed and configured.

Use Oracle9iAS Web Cache Manager... Use the webcachectl Utility...
  1. Start Oracle9iAS Web Cache Manager.

    See Also: "Starting Oracle9iAS Web Cache Manager"

  2. In the navigator pane, select Administration > Operations.

    The Operations page appears.

  3. In the Operations page, choose Restart.

From the command line, enter:

webcachectl restart

When you restart Oracle9iAS Web Cache, all objects are cleared from the cache. In addition, all statistics are cleared.


Note:

You must restart the admin server process with the webcachectl restart command rather than with the Restart option if you modified either of the following configuration settings:

  • administrator password, invalidator password, or trusted subnet settings in the Security page (General Configuration > Security)

  • Operations ports in the Operations Ports page (Administration > Operations)


See Also:

"Starting and Stopping Oracle9iAS Web Cache"

Configuring Oracle9iAS Web Cache for HTTPS Requests

You can configure Oracle9iAS Web Cache to receive HTTPS browser requests and send HTTPS requests to the origin server. HTTPS uses the Secure Sockets Layer (SSL) to encrypt and decrypt user page requests as well as the pages that are returned by the origin server.

To configure HTTPS support, perform these tasks:

Task 1: Create Wallets

Wallets are needed to support the following HTTPS requests:

Each site requires at least one wallet. One wallet can be shared among all the Oracle9iAS Web Cache listening ports, or a separate wallet can be created for each Oracle9iAS Web Cache listening port.

To create a wallet, use Oracle Wallet Manager. Create the wallet as the following user:

When the webcachectl or OracleHOME_NAMEWebCache service starts the cache server process, Oracle9iAS Web Cache opens the wallet as the webcachectl or the OracleHOME_NAMEWebCache service owner.

By default, wallets are stored in the following locations:

See Also:

Enabling Wallets to Open on Windows

Oracle9iAS Web Cache attempts to open wallets at startup on Windows. On Windows, wallets are protected so that only the user that created them can open and use them. By default, Oracle9iAS Web Cache services are associated with the local system account, which does not have permission to open wallets.

To enable Oracle9iAS Web Cache to open wallets at startup:

  1. Create a wallet with an administrator account.

  2. Change the system account information for the Oracle9iAS Web Cache services:

    Windows NT Windows 2000
    1. Choose the Services icon from the Control Panel window.

      The Services window appears.

    2. Select the OracleHOME_NAMEWebCache service.

      The Service dialog appears.

    3. Choose This Account.

      By default the LocalSystem user account is associated with the service.

    4. Choose the ellipse (...) next to This Account.

      The Add User dialog box appears.

    5. Select the user that created the wallet from the Names list, and then choose Add.

    6. Choose OK to close the Add User dialog box.

    7. In the Service dialog box, provide the password for the wallet administrator in the Password field, and then confirm the password in the Confirm Password field.

    8. In the Services dialog box, choose OK.

    9. Repeat Steps 3 - 8 for the OracleHOME_NAMEWebCacheAdmin and OracleHOME_NAMEWebCacheMon service.

    10. In the Services window, choose Close.

    1. Choose Administrative Tools > Services from the Control Panel window.

      The Services window appears.

    2. Select the OracleHOME_NAMEWebCache service.

      The OracleHOME_NAMEWebCache Properties dialog appears.

    3. Choose the Log On tab.

    4. In the Log On tab, choose This account.

      By default the LocalSystem user account is associated with the service.

    5. Choose Browse next to This Account.

      The Select User dialog box appears.

    6. Select the user that created the wallet from the list, and then choose OK.

    7. Choose OK to close the Add User dialog box.

    8. In the OracleHOME_NAMEWebCache Properties dialog box, provide the password for the wallet administrator in the Password field, and then confirm the password in the Confirm Password field.

    9. In the Services dialog box, choose OK.

    10. Repeat Steps 3 - 9 for the OracleHOME_NAMEWebCacheAdmin and OracleHOME_NAMEWebCacheMon services.

On Windows NT, additionally grant the wallet administrator the right to run Oracle9iAS Web Cache as a service:

  1. Choose Start > Programs > Administrative Tools > User Manager.

    The User Manager window appears.

  2. Select the wallet administration, and then choose Policies > User Rights.

    The User Rights Policy dialog box appears.

  3. Choose the Show Advanced User Rights check box, and then select Log on as a service from the Right list.

  4. Select Users from the Grant To list.

    If Users does not exist, create it:

    1. Choose Add.

      The Add Users and Groups dialog box appears:

    2. Select the name of the local host computer from the List Names From list.

    3. Select Users from the Names list, and then choose Add.

    4. Choose OK.

      Users appears in the Grant To list.

  5. Choose OK in the User Rights Policy dialog box.

    The User Manager window reappears.

  6. Choose User > Exit.

    See Also:

    "Wallet Cannot Be Opened"

Task 2: Configure HTTPS Ports and Wallet Location

To configure HTTPS protocol support between browsers and Oracle9iAS Web Cache:

  1. Select Cache-Specific Configuration > Listening Ports in Oracle9iAS Web Cache Manager to configure Oracle9iAS Web Cache with an HTTPS listening port and the location of the wallet for each supported site.

  2. Select Cache-Specific Configuration > Operations Ports in Oracle9iAS Web Cache Manager to configure administration, invalidation, and statistics monitoring requests with HTTPS listening ports and the location of the site's wallet.

    The ports for these requests can share the same wallet as established for the Oracle9iAS Web Cache listening port in Step 1.

    See Also:

To configure HTTPS protocol support between Oracle9iAS Web Cache and origin servers:

  1. Select General Configuration > Application Web Servers or Proxy Servers in Oracle9iAS Web Cache Manager to configure an application Web server or proxy server with an HTTPS communication port.

  2. Select Cache-Specific Configuration > Origin Server Wallet in Oracle9iAS Web Cache Manager to specify the location of the wallet used for communication from Oracle9iAS Web Cache to an origin server.

    The ports for these requests can share the same wallet as established for the Oracle9iAS Web Cache listening ports.

    See Also:

Task 3: (Optional) Permit Only HTTPS Requests for a Site

You can restrict a URL or set of URLs for a site to permit only HTTPS requests.

To allow only HTTPS traffic for a URL or a set of URLs:

  1. Configure Web site settings, as described in "Task 10: Configure Web Site Settings".

  2. In Step 1e, enter the URL or URL prefix.

    If all traffic must be restricted to HTTPS, enter "/" for the entire site.

Configuring Multiple Origin Servers

This section describes additional configuration options available for deployments with two or more origin servers.

This section contains these topics:

Configuring Load Balancing and Failover

For those requests that Oracle9iAS Web Cache cannot serve, you can distribute the requests over a set of origin servers with the Oracle9iAS Web Cache load balancing feature. To configure load balancing, you configure the capacity for each origin server.

When load balancing is configured and an origin server is no longer available, Oracle9iAS Web Cache automatically performs backend failover of the origin servers. Oracle9iAS Web Cache knows if an origin server is down when a failover threshold has been met.

An origin server can become unavailable if it is taken down for reconfiguration or there is a network or hardware failure. In these scenarios, Oracle9iAS Web Cache automatically distributes the load over the remaining origin servers and polls the failed origin server for its current up or down status until it is back online. Existing requests to the failed origin server result in errors. However, new requests are directed to the other origin servers. When the failed server returns to operation, Oracle9iAS Web Cache includes it in the load distribution.

See Also:

Binding a Session to an Origin Server


Note:

If an origin server is busy, then Oracle9iAS Web Cache disables session binding to that origin server.


You can configure Oracle9iAS Web Cache to support origin server session binding, whereby a user session is bound to an origin server in order to maintain state for a period of time. To utilize this feature, the origin server itself must maintain state, that is, it must be stateful.

As long as the session information is contained within a session cookie or an embedded URL parameter, Oracle9iAS Web Cache can keep track of sessions between Web browsers and origin servers. A session cookie or an embedded URL parameter enables Oracle9iAS Web Cache to bind a particular user session to a specific origin server.

See Also:

"Session Binding" for an overview of origin server binding

To configure Oracle9iAS Web Cache to support binding a user session to origin servers that are stateful:

  1. Start Oracle9iAS Web Cache Manager.

    See Also:

    "Starting Oracle9iAS Web Cache Manager"

  2. In the navigator pane, select General Configuration > Session Management > Session Binding.

    The Session Binding page appears.

  3. In the Session Binding page, select a session entry in the table, and then choose Edit.

    The Change/Add Session Binding dialog box appears.

  4. From the Please select a session list, select a session, and then skip to Step 7.

    If the sessions listed do not contain the definition you require, then choose Cancel to exit the Change/Add Session Binding dialog box. Continue to Step 5.

  5. Create a session definition:

    1. In the navigator pane, select General Configuration > Session Management > Session/Personalized Definitions.

      The Session/Personalized Attribute Definitions page appears.

    2. From the For Site list, select the Web site for which to create site-specific site definitions.

    3. Choose Add or Create.

      The Create Session/Personalized Attribute Definitions page appears.

    4. In the Session/Attribute field, enter an easy-to-remember unique name for the attribute.

    5. Enter the cookie name in the Cookie Name field and the embedded URL parameter in the URL Parameter field.

      If you enter both a cookie name and an embedded URL parameter, keep in mind that both must be used to support the same session. If they support different sessions, create separate session definitions. You can specify up to 20 session definitions for each page.


      Note:

      Oracle9iAS Web Cache requires a session cookie to perform session binding.

      If browsers do not support cookies and you want to use an embedded URL parameter for the session, then perform the following for Oracle9iAS Web Cache to perform session binding on the session:

      1. In addition to the URL Parameter field, specify a cookie name for the session in the Cookie Name field.

      2. Ensure that the origin server returns a Set-Cookie response-header with the value of the session every time a session is created.

        Set-Cookie: cookie=value

        Set value to the same value as set in the URL Parameter field.

      Oracle9iAS Web Cache uses the Set-Cookie response header, even if ignored by browsers, to locate the session cookie value for session binding.

      See Also: http://rfc.net/rfc2965.html for further information about the Set-Cookie response header.



      Note:

      When a session cookie expires, Oracle9iAS Web Cache does not continue to bind the user session to the origin server. Instead, Oracle9iAS Web Cache uses load balancing to choose an origin server. To avoid pages being served past the browser session expiration time, ensure that the session cookie expires before the origin server expires the browser session.


    6. Choose Submit.

    7. Repeats Steps 1 through 4.

  6. In the Inactivity Timeout field, enter the number of minutes you want Oracle9iAS Web Cache to wait before timing out an inactive session to the origin server.

    Oracle Corporation recommends setting the value to a higher value than the inactivity timeout set for the Web site.

  7. Choose Submit.

Configuring a Hierarchy of Caches

This section describes additional configuration options available for cache hierarchy deployments.

This section contains these topics:

Configuring a Distributed Cache Hierarchy

In a distributed cache hierarchy, the central cache stores content from application Web servers, and the remote cache stores content from the central cache. In a distributed cache hierarchy, the central caches acts as origin servers to the remote cache

To configure a distributed cache hierarchy, perform the tasks in "Setting Up Oracle9iAS Web Cache" for each cache. When performing the tasks, take special care to perform the following:

  1. Configure the correct origin server:

    • For the central cache, configure the central origin server in the Application Web Servers page or Proxy Servers page (General Configuration > Application Web Servers or Proxy Servers).

    • For the remote caches, configure the central cache as the origin server in the Application Web Servers page.

  2. Create the same site definition for both the central and remote caches in the Site Definitions page (General Configuration > Sites).

  3. For both central and remote caches, map the site definition to the origin server (configured in Step 1) in the Site to Server Mapping page (General Configuration > Site to Server Mapping):

    • For the central cache, map the site to the application Web server or proxy server.

    • For the remote cache, map the site to the central cache.

    When content from the central cache becomes invalid, an invalidation message is sent to its cache. In addition, the central cache propagates the invalidation message to the remote caches.


    Note:

    In order for automatic propagation of invalidation messages to work, Oracle9iAS Web Cache passes the encoded invalidator password in the page request between the remote and central cache. This HTTP traffic is susceptible to network sniffing. If the network is unprotected and insecure, configure HTTPS ports as follows:

    1. In the Listening Ports page (Cache-Specific Configuration > Listening Ports) of the central cache, disable the default HTTP port. An HTTPS port is already configured by default.

    2. In the Operations page (Cache-Specific Configuration > Operations Ports) of the remote cache, disable the default HTTP port and configure an HTTPS port in its place.


Table 6-1 shows the example settings for the deployment depicted in "Deploying a Distributed Cache Hierarchy".

Table 6-1  Settings for us.webche-host and jp.webche-host
Setting Location in Oracle9iAS Web Cache Manager Central Cache us.webche-host Remote Cache jp.webche-host

Listening Port (Cache-Specific Configuration > Listening Ports)

Port Number: 7777

Port Number: 7777

Application Web Server (General Configuration > Application Web Servers or Proxy Servers)

Host Name: us.server1-host

Port Number: 7778

Host Name: us.server2-host

Port Number: 7778

Host Name: us.webche-host

Port Number: 7777

Site Definition (General Configuration > Sites)

Host Name: www.server.com

Port Number: 80

Host Name: www.server.com

Port Number: 80

Site-to-Server Mapping (General Configuration > Site to Server Mapping)

Site Host Name and Port: www.server.com:80

Origin Server Host Name and Port: us.server1-host:7778

us.server2-host:7778

Site Host Name and Port: www.server.com:80

Origin Server Host Name and Port: us.webche-host:7777

Configuring an ESI Cache Hierarchy

In an ESI cache hierarchy, a provider cache stores content from an ESI provider site, and a subscriber cache stores content from the origin servers for a local site and contacts provider caches for ESI fragments. In an ESI cache hierarchy, the provider caches acts as origin servers to the subscriber cache.

To configure an ESI cache hierarchy, perform the tasks in "Setting Up Oracle9iAS Web Cache" for each cache. When performing the tasks, take special care to perform the following:

  1. Configure the correct origin server:

    • For each provider cache, configure the origin servers of the ESI provider site in the Application Web Servers page or Proxy Servers page (General Configuration > Application Web Servers or Proxy Servers)

    • For the subscriber cache, configure the origin servers of the local site and the provider caches in the Application Web Servers page.

  2. Create site definitions:

  3. For both subscriber and provider caches, map the site definition to the origin server (configured in Step 1) in the Site to Server Mapping page (General Configuration > Site to Server Mapping):

    • For the provider cache, map the site definition to the origin server of the ESI provider site.

    • For the subscriber cache, map the local site definition to the origin server for that site, and map each ESI provider site definition to its respective provider cache

    When content from the provider cache becomes invalid, an invalidation message is sent to its cache. In addition, the provider cache propagates the invalidation message to the subscriber cache.


    Note:

    In order for automatic propagation of invalidation messages to work, Oracle9iAS Web Cache passes the encoded invalidator password in the page request between the subscriber and provider cache. This HTTP traffic is susceptible to network sniffing. If the network is unprotected and insecure, configure HTTPS ports as follows:

    1. In the Listening Ports page (Cache-Specific Configuration > Listening Ports) of the provider cache, disable the default HTTP port. An HTTPS port is already configured by default.

    2. In the Operations page (Cache-Specific Configuration > Operations Ports) of the subscriber cache, disable the default HTTP port and configure an HTTPS port in its place.


Table 6-2 shows the example settings for the deployment depicted in "Multiple Internal ESI Provider Sites".

Table 6-2  Settings for webche1 and webche2
Setting Location in Oracle9iAS Web Cache Manager Subscriber Cache webche-host Provider Cache webche-providerhost

Listening Port (Cache-Specific Configuration > Listening Ports)

Port Number: 7777

Port Number: 7777

Application Web Server (General Configuration > Application Web Servers)

Host Name: server-host

Port Number: 7778

Host Name: provider1-host

Port Number: 7778

Host Name: webche-providerhost

Port Number: 7777

Host Name: provider2-host

Port Number: 7778

Site Definition (General Configuration > Sites)

Host Name: www.server.com

Port Number: 80

Host Name: www.providersite1.com

Port Number: 80

Host Name: www.providersite2.com

Port Number: 80

Host Name: www.providersite2.com

Port Number: 80

Site-to-Server Mapping (General Configuration > Site to Server Mapping)

Site Host Name and Port: www.server.com:80

Origin Server Host Name and Port: server-host:7778

Site Host Name and Port: www.providersite1.com:80

Origin Server Host Name and Port: provider1-host:7778

Site Host Name and Port: www.providersite2.com:80

Origin Server Host Name and Port: webche-providerhost:7777

Site Host Name and Port: www.providersite2.com:80

Origin Server Host Name and Port: provider2-host:7778

Configuring a Cache Cluster

To increase the availability and scalability of your Web site, you can configure multiple instances of Oracle9iAS Web Cache to run as members of a cache cluster.

To configure a cache cluster, you specify the general cluster information in the Cluster Configuration page of the Oracle9iAS Web Cache Manager and add two or more Oracle9iAS Web Cache instances to the cache cluster.

A cache cluster uses one configuration that is propagated from the current cache (the cache to which your browser is connected) to all cluster members. The configuration contains settings that are the same for all cluster members as well as cache-specific settings for each cluster member.

The following settings pertain to all members of a cluster:

The following settings are specific to the each member of the cluster:

Because a cache cluster contains two or more instances of Oracle9iAS Web Cache, you must have two or more instances of Oracle9iAS Web Cache installed on one or more nodes before you configure a cache cluster. The instances must be the same version of Oracle9iAS Web Cache.

To configure a cache cluster, perform these tasks:

Task 1: Configure the Cache Cluster Settings

To configure the settings for a cache cluster:

  1. In the navigation pane, select Administration > Cluster Configuration.

    The Cluster Configuration page appears. The General Cluster Information section displays the default clusterwide values for failover and invalidation propagation. The Cluster Members table displays the current cache (the cache to which you are connected) as the only cluster member. Oracle9iAS Web Cache ignores the cluster information if there is only one cluster member.

  2. In the General Cluster Information section of the Cluster Configuration page, choose Edit.

    The Change General Cluster Information dialog box appears.

  3. In the Cluster Name field, enter a name for the cluster.

  4. In the Failover Threshold field, enter the number of allowed consecutive request failures before Oracle9iAS Web Cache considers another cache cluster member to have failed.

    Oracle9iAS Web Cache considers a request to another cache cluster member to have failed if:

    • There are any network errors

    • The HTTP response status code is either less than 100, or is either 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable, or 504 Gateway Timeout messages

    For each failed request, Oracle9iAS Web Cache increments the failure counter for that cluster member. This counter is kept separately by each cluster member. When a request is successfully processed by a cluster member, Oracle9iAS Web Cache resets the failure counter.

    When the failover threshold is met, Oracle9iAS Web Cache considers the cache cluster member to have failed. Oracle9iAS Web Cache recalculates the relative capacity of the remaining cache cluster members. It then reassigns ownership of cache content.

    When a cache cluster member is down, Oracle9iAS Web Cache starts polling the cache cluster member. It does this by sending requests to the URL specified in the Ping URL field. When Oracle9iAS Web Cache receives a success response from the cache cluster member, it considers that cache cluster member to be up again. It recalculates the relative capacity of the cache cluster members and it reassigns ownership of cache content.

  5. In the Ping URL field, enter the URL that cache cluster members will use to attempt to contact a cache cluster member that has reached its failover threshold.

    Use a URL that you can guarantee is stored in each cache. The default is "/".

  6. In the Ping Interval field, enter the time, in seconds, between attempts by a cluster member to reach the failed cluster member.

  7. In the Propagate Invalidation field, select Yes or No to specify whether or not you want all invalidation requests from any cache cluster member to be propagated to other cache cluster members.

  8. Choose Submit.

  9. In the Cluster Members table of the Cluster Configuration page, default values are displayed for the current cache. Select the cache and choose Edit Selected.

    The Edit Cluster Member dialog box appears.

  10. In the Cache Name field, enter a name for the Oracle9iAS Web Cache instance. The name must be unique from the names of other caches in the cache cluster.

  11. By default, the Host Name field contains the host name of the node on which Oracle9iAS Web Cache is installed. Usually, you do not need to modify this field.

  12. By default, the Oracle Home field contains the file specification for the Oracle home in which Oracle9iAS Web Cache is installed. Usually, you do not need to modify this field. Note that the combination of Host Name and Oracle Home must be unique in a cache cluster.

  13. In the Capacity field, enter the number of concurrent incoming connections from other cache cluster members that Oracle9iAS Web Cache can sustain.

    This field is used in two different ways:

    • As the absolute capacity for the number of concurrent incoming connections to this cache cluster member from all other cache cluster members.

      The connections are used to receive requests for owned content from other cache cluster members. The number of connections are divided among the other cluster members. For example, in a three-cache cluster, if the capacity of Cache_A is 50, Cache_B can open 25 connections to Cache_A and Cache_C can open 25 connections to Cache_A.

      More connections are used when another cache cluster member contains little or no data in its cache, such as when it is initially started, when it recovers from a failure, or after invalidation. During this time, the cluster member sends many of the requests to its peers, the owners of the content. In most cases, these requests are satisfied more quickly than requests to the origin server. Having a higher number of connections increases performance during this time and shortens the time it takes to fully load the cache. After a cache is fully loaded, fewer of the connections are used. There is no overhead for unused connections.

    • As the relative capacity of the cache cluster member.

      The capacity of a cache cluster member is weighted against the total capacity of all active cache cluster members. When you set the capacity, Oracle9iAS Web Cache assigns a percentage of the ownership array to the cluster member, indicating how much of the cached content will be owned by the cluster member. The percentage is calculated using the following formula:

      cluster_member_capacity / total_capacity_of_all_active_cluster_members
      
      

      For example, if cache cluster member Cache_A has a capacity of 100 and cache cluster member Cache_B has a capacity of 300, for a total capacity of 400, Cache_A is assigned 25 percent of the ownership array and Cache_B is assigned 75 percent of the ownership array. That means that Cache_A owns 25 percent of the cached content.

      Note that in calculating the relative capacity, Oracle9iAS Web Cache considers the capacity of active cluster members; it does not consider the capacity of cluster members that it has determined to have failed.

    In most cases, a capacity of 100 is a reasonable number to use as a starting point.

  14. Choose Submit.

    You now have one cache, the current cache, in the cluster. However, the cluster information is ignored until you have more than one Oracle9iAS Web Cache instance in the cluster.

Task 2: Add Caches to the Cluster

Before you can add a cache to the cluster, the following conditions must be met:

To add another cache to the cluster:

  1. In the navigation pane, select Administration > Cluster Configuration.

    The Cluster Configuration page appears.

  2. In the Cluster Members section of the Cluster Configuration page, choose Add.

    The Add Cache to Cluster dialog box appears.

  3. In the Host Name field, enter the host name of the cache to be added to the cluster.

  4. In the Admin Port field, enter the administration port for the cache to be added to the cluster.

    The administration port is the listening port for administrative requests.

  5. In the Cache Name field, enter a name for the cache. The name must be unique from the names of other caches in the cache cluster.

  6. In the Capacity field, enter the number of concurrent incoming connections from other cache cluster members that Oracle9iAS Web Cache can sustain.

    See Also:

    Step 13 in "Task 1: Configure the Cache Cluster Settings" for more information about capacity

  7. Choose Submit.

    The cache is now part of the cluster and is listed in the Cluster Member table.

  8. To add more Oracle9iAS Web Cache instances to the cache cluster, repeat Steps 1 through 7.

  9. When you have completed adding members to the cache cluster, choose Apply Changes.

Oracle9iAS Web Cache adds the cache-specific information from the new cache cluster members to the cluster configuration.

You can add more Oracle9iAS Web Cache instances to the cluster at any time by choosing Add. You can modify the settings for a cache cluster member by choosing Edit Selected. You can delete a cache cluster member, other than the current cache, by choosing Delete Selected.

Task 3: Propagate the Configuration to Cluster Members

When you modify the cluster and choose Apply Changes, Oracle9iAS Web Cache adds the cache-specific information from the new cache cluster members to the configuration. For those changes to take affect in all cluster members, you must propagate the configuration and restart the cache server process of the cluster members.

To propagate the configuration to new cluster members:

  1. In the navigation pane, select Administration > Operations.

    The Operations page appears. The Operation Needed column indicates the caches to which the configuration should be propagated.

  2. To propagate the configuration to all cache cluster members:

    1. Select All caches in the Operate On field.

    2. Select an Interval to stagger the time that operation begins on the caches.

    3. Choose Propagate.

    (Alternatively, you can propagate the configuration to one cluster member at a time. Choose Selected cache in the Operate On field, and then choose Propagate.)

    When the operation completes, the Operation Needed column in the Operations page indicates the cluster members that need to be restarted.

  3. To stop and restart all cluster members:

    1. Select All caches in the Operate On field.

    2. Select an Interval to stagger the time that operation begins on the caches, and then choose Restart. (Alternatively, you can restart one cluster member at a time.)

    3. Choose Selected cache in the Operate On field.

    4. Choose Restart.

When the operation completes, the Operation Needed column in the Operations page indicates that no operations are needed. The cache cluster is ready to use.


Go to previous page Go to next page
Oracle
Copyright © 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index