Library Table of Contents Index Previous Next Comments

Examples of automatic proxy configuration files

What this section contains  Top

This section contains examples of automatic proxy configuration files that you can edit for use at your organization. The example for multiple Web caches includes comments to help you identify what to change and what to leave as is.

Note
See the Guide to Global Request Manager for example proxy.pac files for use with GRM.

Examples: single Web cache  Top

For the next two examples, assume that the organization has only one NetCache appliance, which is functioning as a Web cache. This example shows a simple automatic proxy configuration file that is set up so that the Web cache is always used. If the Web cache goes down, failover to the Internet does not occur.

The PROXY statement, shown in the following example, has the IP address of the Web cache and the port. Change those to the IP address and port for your NetCache appliance.

In the following example for this single NetCache appliance, the DIRECT statement is appended to the PROXY statement that is in the first example. The DIRECT statement sets up the file so that if the Web cache is unavailable, the client should attempt to connect to the Internet directly; that is, failover to the Internet occurs.

Example: multiple Web caches  Top

The following example illustrates setting up the file for distributing Web requests over multiple servers and for failover.

The previous example is available on the NOW Web site with the NetCache product manuals.

How requests are distributed

The method used in this file to distribute requests over the Web caches is the string length of the URL's host name. The reason this method is used is that if the selection method was not restricted to the host name, performance would drop because subsequent URLs within a page might be sent to different caches. Each cache would then need to establish its own persistent TCP connection to the requested Web server, which reduces performance and adds latency.

How request distribution is accomplished

This file is set up so that requests are distributed over four NetCache appliances that are running as Web caches (192.168.1.1:8080, 192.168.1.2:8080, 192.168.1.3:8080, and 192.168.1.4:8080).

You configure distribution of requests over the Web caches as follows:

How failover is accomplished

This file includes parameters for failover, which you might or might not want to have in your automatic proxy configuration file.

Balancing the load of authenticated users across NetCache appliances  Top

In this example, an enterprise company wants to authenticate users. The company wants to use a proxy.pac file to balance the load of requests across two NetCache appliances, but the company does not want users to have to authenticate more than once.

To eliminate the need for users to authenticate to each NetCache appliance, the proxy.pac file was set up so that last digit of the client IP address was used for hashing. Requests for clients for which the last digit of their IP address is odd are sent to one NetCache appliance and requests for clients for which the last digit of their IP address is even are sent to the other NetCache appliance.

The following example shows the proxy.pac file to support this scenario.

The DIRECT statement is included so that if neither cache is available, the browser can resolve the URL directly from the source. If you do not want failover to the Internet, do not include this statement. See Example: multiple Web caches for an example of the use of the DIRECT statement.

Library Table of Contents Index Previous Next Comments