Library Table of Contents Index Previous Next Comments

Using a proxy.pac file with a GRM L7 server

Using a proxy.pac file to locate GRM agent caches  Top

An alternative to using a device to direct client requests to a GRM L7 server is to configure client browsers to point to a GRM L7 server with an automatic proxy configuration file that supports L7 redirection. The automatic proxy configuration file (typically called a proxy.pac file) is used to direct requests to the GRM agent caches close to clients.

A proxy.pac file consists of a JavaScript function. You create the file by entering the JavaScript function in the file. Each time a client requests a URL, the JavaScript function is executed, and it returns the IP addresses that should be used for retrieving the resource.

For each GRM L7 server that you deploy, you create a proxy.pac file and include in it specific keywords that the GRM L7 server recognizes. You then upload that file to the GRM L7 server.

To enable client requests to reach a specific GRM L7 server, you must determine which GRM L7 server is closest to each client. You must then manually configure each client browser to point to the GRM L7 server that is closest to that client.

Note
For general information about automatic proxy configuration files, see the Deployment Guide.

How the GRM L7 server uses the proxy.pac file  Top

When the GRM L7 server responds to a client request, it makes a copy of the proxy.pac file and dynamically replaces the GRM-specific keywords in the proxy.pac file with one or more lists of IP addresses of qualifying GRM agent caches. To determine the list of qualifying caches, the GRM L7 server applies its rules to determine eligibility, for example, its edge cache and domain and policy filtering rules.

How load balancing works with a proxy.pac file  Top

You can implement load balancing over GRM agent caches by including multiple lists of GRM-specific keywords (as described in What you need to modify in the proxy.pac file for the GRM L7 server). In this way, you control the number of lists of GRM agent caches that the GRM L7 server sends to the client by the values you include in the proxy.pac file.

The GRM L7 server incudes a mechanism to support load balancing over GRM agent caches when a proxy.pac file is used. The GRM L7 server rotates the order of IP addresses in the proxy.pac file keywords that it replaces. The reason is that client browsers always begin with the first IP address in the list and proceed to the second IP address only if the first cache is unavailable. If the majority of clients received the same list (in the same order), the first GRM agent cache would be selected by all the browsers unless the cache was unavailable.

What you need to modify in the proxy.pac file for the GRM L7 server  Top

To use a proxy.pac file to direct client requests to a GRM L7 server, you must replace certain standard lines in the proxy.pac file with keywords that the GRM L7 server recognizes.

Before uploading the proxy.pac file to a GRM L7 server, replace all instances of the following lines in the file:

PROXY IP1:port; PROXY IP2:port

with

PROXY GRM-IP-LIST:port

The following proxy.pac file example shows the file after the instances of PROXY IPx:port were changed to PROXY GRM-IP-LIST:port.

The DIRECT statement sets up the file so that if all GRM agent caches whose IP addresses are returned are unavailable, the client attempts to fetch the content from the origin server directly.

When the GRM L7 server sends the copy of the proxy.pac file to the client in response to a client request, the GRM L7 server rewrites the keyword lines PROXY GRM-IP-LIST:port with the IP addresses of qualifying GRM agent caches. The following example shows the same proxy.pac file as in the previous example, but with the two PROXY IP1:port; PROXY IP2:port lines overwritten by the GRM L7 server. Each line includes the list of two IP addresses for qualifying center caches, and each list ends with the DIRECT statement.

When it rewrites the file, the GRM L7 server rotates the IP addresses 10.56.18.123:8080 and 10.56.18.125:8080 between clients so that each list begins with a different address. This process enables load balancing over GRM agent caches.

How the GRM server determines the number of IP addresses to return  Top

The number of IP addresses that the GRM L7 server writes to each of the replaced PROXY GRM-IP-LIST:port lines in the proxy.pac file is determined by the value of the Maximum Number of Caches option, which defaults to 4. If the Maximum Center Caches option is set to 2 and there are two qualifying center caches (as is the case in the previous example), the GRM L7 server rewrites each of the two lines in the file to include the two IP addresses. To ensure load balancing, the GRM L7 server reverses the order in which it writes the IP addresses for each line when it responds to different client requests.

The Maximum Center Caches option is on the GRM Server - General page in the Appliance Manager.

Configuring client browsers to access a proxy.pac file  Top

The proxy.pac configuration is supported by both Netscape Navigator and Microsoft Internet Explorer browsers. For example, to configure the Microsoft Internet Explorer browser for proxy.pac file use, you configure the following Internet Options > LAN settings:

Uploading a proxy.pac file to the GRM L7 server  Top

For details about uploading the proxy.pac file to an appliance, see the Appliance Manager online Help.

Library Table of Contents Index Previous Next Comments