CARP
The Cache Array Routing Protocol (CARP) is an advanced caching technique used by Proxy Server 2.0 that increases the performance of the Web cache on proxy server arrays. CARP runs over HTTP and is compatible with existing firewalls and other proxy servers. CARP is a more efficient method of array caching than Internet Cache Protocol (ICP), which originally allowed Proxy Servers to query each others caches.
In ICP, proxy servers that couldnt locate a requested object in their own cache could query the members of their array individually. This meant that a single proxy server might call each of the other servers in the array until the object is found or the request is referred to the Internet. There are several negative side effects to this cache sharing method:
Excess network traffic When a single proxy server cannot find an object in its own cache it calls each member of its array before going to the Internet. Each call must be answered with either the requested information or a negative acknowledgement.
Redundant caching As proxy servers rely on each others Web caches to satisfy requests, their caches become increasingly redundant. Eventually the members of a proxy server can have nearly identical cached data.
Negative scalability As you add more proxy servers to the array, network traffic increases due to the querying between the servers. This actually reduces performance at a certain point instead of continually improving it.
CARP solves those problems by employing a hash function that prevents Web cache redundancy and eliminates querying between proxy servers to find cached objects. The hash function is a mathematical computation based on the name of the proxy server and the address of the object to be cached. Because its a mathematical computation, theres no need for the array members to maintain huge pointer tables to determine the location of a cached item. Each member can perform the calculation to determine which array member has the requested resource.
The hash function is computed for the name of each URL that is cached. The value of the URL is used with the value for the proxy array member to determine where the object will be cached. The object is cached in only one location, so theres no redundancy. Additionally, the hash function is geared to provide load balancing across the array, so that each proxy server has a roughly equivalent number of objects in its cache.
Because the CARP array members effectively have one large logical cache, CARP arrays have positive scalability. In other words, the more proxy servers added to the array, the more efficient the array becomes. CARP also automatically adjusts to additions or deletions of array members. A minimal reassignment of URLs occurs when clients are either added to or removed from the array.
One additional benefit of CARP is that it can be extended to proxy clients. Clients applications can use Proxy-Auto-Config (PAC) files to improve the caching performance of the array. When configured with PAC, the client can immediately request the object from the correct array member. Internet Explorer 4.0 is an example of a PAC-aware client application.
Tip: Internet Explorer 4.0 is a PAC-aware application. When you use the automatic Web browser configuration for Internet Explorer 4.0, it becomes aware of the proxy array members and is able to route requests for Web objects directly to the array member that should have the information.
WINS
If you use a Windows Internet Name Service (WINS) Server on your network for TCP/IP name resolution, you can use the WINS Server to direct proxy clients to the nearest proxy server array member. To enable this capability, you must configure a multihomed entry in the WINS Server for the proxy array. To do this, follow these steps:
Open the WINS Manager.
Click the Mappings menu, then select Static Mappings.
Click the Add Mappings button.
In the Name textbox, enter the name of the proxy array.
In the Type section, click the Multihomed radio button.
In the IP Address(es) textbox, enter the IP address of every proxy array member. After each address, click the Return (down-arrow) button on the dialog box (Figure 9).
Once youve entered all of the addresses, click the Add button.
When youre finished, click the Close button on both open dialog boxes and exit the WINS Manager application.
During name resolution the WINS server resolves the Proxy Clients name to an IP address. Then, if the client has requested the name of the Proxy array, it refers the Proxy Client to the first address it finds on the clients subnet. If theres no array member on its subnet, it looks for an address on the same net as the client.
DNS
If you prefer to use DNS for name resolution on your network, you can also configure DNS round robin resolution to distribute cache requests across the proxy server array. To configure this, you must create multiple entries in the DNS server for the proxy array. Map each entry to a different IP address, one for each array member. Figure 10 shows an example for an array named P2Array, which has been mapped to IP addresses 192.168.1.50 through 192.168.1.52.
Once this has been configured, proxy clients attempting to contact the array will be routed to a different array member in a round robin fashion. To illustrate this, Figure 11 shows a ping to the address P2Array. Notice that a different IP address is returned for each successive request.
Note: A similar task can be accomplished with DNS CNAMES canonical name records. However, it is recommended that you use A Records for more consistent results. (See the April 98 edition of Windows NT Magazine, Load Sharing for your NT Web Server, for more information).
If you use DNS on your internal network for local name resolution only, you can keep your internal Microsoft DNS server from blocking Internet name resolution attempts by turning off recursive querying. This means that your DNS server will only attempt to answer name resolution requests for which it has records. To disable recursive querying, edit the following Windows NT Registry location with Regedit.exe or Regedt32.exe:
Add the value NoRecursion:REG_DWORD:0x1 to the Parameters key.
PROXY CLIENTS AND INTERNET ACCESS
Distributed caching techniques available through Microsoft Proxy Server 2.0 provide several options for improving the efficiency of the proxy Web cache. In addition, proxy server clients that support the Proxy-Auto-Config (PAC) can further increase the efficiency of the cache. In this section, we take a look at how different configurations affect the number of hops that a client request can make before being sent to the Internet.
In a Proxy chain configuration, the number of hops a client request can take before its sent to the Internet is one plus the number of proxy servers in the proxy chain. Consider the example shown in Figure 12.
If the requested object isnt available in the caches of any proxy chain member, then the request is sent to the Internet. In Figure 12, there are three chained Proxy Servers before the Internet and the request will be sent to the Internet on the fourth hop.
When compared to proxy chains, the proxy array CARP hash function provides a more efficient route to the Internet. Consider the example shown in Figure 13.
Client 1 in the graphic is a non-PAC aware application that doesnt use the CARP hash function, but simply calls the proxy array directly. This means that a request from Client 1 may need to be routed to the correct array member before its determined that the requested object isnt in the cache. A minimum of two hops and a maximum of three hops are used before a request from Client 1 hits the Internet.
Client 2 is a PAC-aware application, which means that it automatically calls the correct array member. If the object isnt in that array members cache, the request is sent to the Internet. That means a maximum of two hops is made before its request hits the Internet.
Client 3 is part of a remote branch office and connects to the main office through a downstream proxy server. However, because the downstream proxy server is able to query the array and use the hash function, theres still only a maximum of three hops to the Internet (for non-cached objects).
Tip: To increase the fault-tolerance of the lone proxy server at the branch office (Figure 13), you should enable a backup route for the Web Proxy cache that is a direct connection to the Internet, as previously described in this chapter.
REMOTMSP.EXE
Remotmsp.exe is a command line utility that allows you to perform several administrative functions, including joining, synchronizing, or removing array members. It is installed into the \Msp folder by default on your proxy server. The command line syntax for remotmsp is as follows:
You will see the various command line actions that you can perform with the REMOTMSP utility. Table 3 illustrates some of the commands that you can perform with the REMOTMSP utility.
You can also stop, start, or check the status of the following individual services:
WP Web Proxy service
WSP WinSock Proxy service
Socks Socks Proxy service
Admin Proxy Administrative service
MailAlter Proxy Alert Service
The REMOTMSP SET command can be used to do the following:
Enable disk caching
Enable access control on the WinSock Proxy and/or Web Proxy services
Set array load factors
Enable array synchronization
Toggle the Resolve in array switch
Technical Note: The REMOTMSP commands, options, and switches are not case sensitive.
SUMMARY
To improve the proxy server Web cache, you can configure both proxy chains and arrays. Proxy chains are hierarchical configurations that link proxy servers to provide more efficient distributed caching. The downstream proxy servers can query the caches of upstream proxy servers before object requests are sent to the Internet. Proxy arrays are peer-to-peer configurations that combine the individual proxy Web caches into one large logical Web cache. A proxy array can also be a component in a proxy hierarchical configuration.
Proxy arrays also provide a level of fault tolerance because some of their configuration information is copied and maintained by all array members. This information is periodically synchronized and array members maintain status information on each other. If one array member fails, the other members take over for the failed member until it returns. CARP allows a proxy array to provide an evenly distributed, non-redundant, query-free Web cache.
Order Your SQL Fundamentals CD Today! Learn how to use SQL Server, understand Office integration techniques and dive into the essentials of SQL Express and Visual Basic with this free SQL Fundamentals CD.
You've Deployed SharePoint...Now What? This one-day free online conference delivers the technical knowledge needed to kick MOSS up a notch. In one information-packed day, independent SharePoint experts will present practical, real-world information and provide take-away, ready-to-use solutions
What Would You Do If You Ran Microsoft? ITTV's 2008 inaugural video contest, "If I Ran Microsoft..." is your chance to tell it like it is. Be goofy or be serious, but don"t miss this chance to have fun, win prizes, and go viral in a major way.
Maximize Your SharePoint Investment This web seminar discusses how true bi-directional replication of SharePoint content from one server to another enables branch offices to maintain access to current SharePoint content.