Beruflich Dokumente
Kultur Dokumente
March 2003
Web Caching 1
Objectives
When you have completed this module
you will be able to do the following:
Configure NetCache for web caching
Configure NetCache for FTP
Configure NetCache for DNS caching
March 2003
Web Caching 2
FTP configuration
HTTP General
configurations
Cacheability Control
by ACLs
IMS (If Modified
Since) rules
Header rules
HTTP Tunneling
DNS
Cache Content pre-fill
March 2003
Web Caching 3
March 2003
Web Caching 4
URLs to Rewrite
Transparently redirects requests for URLs to local mirror sites that you specify. To use
this option, specify the URL for which you want to redirect requests and the URL to
which the requests should be redirected.
March 2003
Web Caching 5
March 2003
Web Caching 6
March 2003
Web Caching 7
March 2003
Web Caching 8
March 2003
Web Caching 9
March 2003
Web Caching 10
TTL Patterns
^http:// 1440
^http:// 0 10% 1300
HTTP objects (strings that begin with http://) are cached for 1440
minutes.
HTTP objects are cached for 10% of the object's age or a
maximum of 1,300 minutes, whichever is less.
March 2003
Web Caching 11
March 2003
Web Caching 12
Examples
http://www.xyz.com cookiexzyx
xyz.com * *
* cookiex *
March 2003
Web Caching 13
IMS Rules
IMS
If-Modified-Since. A query that NetCache sends to a Web server in order to verify the
freshness of an object, that is, to determine whether the object has been modified.
March 2003
Web Caching 14
March 2003
Web Caching 15
March 2003
Web Caching 16
March 2003
Web Caching 17
March 2003
Web Caching 18
March 2003
Web Caching 19
Response Header
Setup > HTTP > Header and Caching Behavior Header Rules
Header Rules
Header Rules tab page displays rules that determine objects from which to delete and/or
insert response headers based on specified actions and conditions.
March 2003
Web Caching 20
HTTP - Tunneling
This feature is used to specify general enabling and authentication settings for HTTP
tunneling services on the NetCache appliance.
Refer to Online Help for specific configuration information.
March 2003
Web Caching 21
FTP Modes
Use options on the Setup tab > FTP > General page to configure this NetCache
appliance for either FTP service over HTTP or transparent FTP service. To complete FTP
service configuration, you must also configure options located elsewhere in the NetCache
Manager Setup tab, as follows:
If you are setting up FTP over HTTP, you must also configure NetCache for HTTP
service (Setup tab > HTTP pages).
If you are setting up transparent FTP, you must also configure the FTP transparency
options (Setup tab > Network > Transparency page).
March 2003
Web Caching 22
March 2003
Web Caching 23
March 2003
Web Caching 24
DNS Caching
When DNS caching is enabled, this NetCache appliance acts as a DNS cache for clientinitiated DNS lookups. NetCache caches DNS A- type records (a mapping of host name
to IP addresses) and proxies all other DNS-related information. After NetCache caches a
host name and IP address, NetCache can resolve a DNS query for the same host.
March 2003
Web Caching 25
March 2003
Web Caching 26
March 2003
Web Caching 27
15 minutes in length
Utilizing Breakout rooms
Instructor will visit all rooms
Broadcast announcement 5 minutes
prior to regroup
Stay focussed, start telnet, start GUI
Share microphones, or no one else can
be heard
March 2003
Web Caching 28
Exercise Overview
The purpose of this activity is for you to perform the procedures introducing you to
NetCache web caching configuration and behavior. During these exercises, you will be
able to go through each step in the process, and will have an opportunity to verify that
each step was successfully completed.
Workstation
NetCache appliance
Software
March 2003
Web Caching 29
2.
3.
Scroll down to HTTP Proxy Ports and observe that the default port is 3128.
4.
5.
Commit Changes.
6.
7.
Change the proxy port on your browsers proxy setting from 3128 to 80.
Note:
If the browser proxy port number and the NetCache HTTP Proxy port
numbers do not agree the browser will not be able to access the
NetCache
2.
TTL Patterns
March 2003
Web Caching 30
2.
Request content from the server and examine the cached object to verify the
TTL = 60 seconds
5.
6.
Then confirm that the TTL set for the object is shown to be one minute by
accessing the NetCache command line and entering:
netcache>object http://pdc/cache/secondtest.htm
7.
March 2003
Web Caching 31
Properties:
URL: http://pdc/cache/secondtest.htm
LastVerify: Wed, 23 Jan 2002 11:31:20 PST
NextVerify: Wed, 23 Jan 2002 11:32:20 PST
MinAge: <not set>
March 2003
Web Caching 32
10.
11.
12.
NetCache>object http://pdc/cache/secondtest.htm
NetCache>object http://pdc/cache/secondtest.htm
Properties:
URL: http://10.32.70.10/cache/secondtest.htm
LastVerify: Wed, 23 Jan 2002 13:05:40 PST
NextVerify: Wed, 23 Jan 2002 15:05:40 PST
MinAge: <not set>
MaxAge: 7200 seconds (0d 2h 0m 0s)
MaxLockAge: <not set>
Response headers:
HTTP/1.0 200 OK
Age: 29
Accept-Ranges: bytes
Date: Wed, 23 Jan 2002 21:05:40 GMT
Content-Length: 323
Content-Type: text/html
Expires: Wed, 23 Jan 2002 23:05:40 GMT
Cache-Control: max-age=7200
Connection: keep-alive
Server: Microsoft-IIS/5.0
Last-Modified: Wed, 23 Jan 2002 19:24:08 GMT
ETag: "b014608743a4c11:a18"
Via: 1.1 C1100-ZCH01840381 (NetCache
NetApp//n/dremel2/rlse7/netcache/nightl
y/RcvN_020120_0830)
March 2003
Web Caching 33
12.
Observe that there is an entry in the NetCache Web Access log similar to the
following:
March 2003
Web Caching 34
2.
Build an explicit caching rule to prove that we can unconditionally cache the
result of a request for content from a site that normally does not get cached:
Prior to testing, please confirm that the instructor has introduced a "CacheControl: no-cache" custom HTTP Header.
At the NetCache prompt, enter:
show config.http.caching.cacheability_rule_list
What was the result?
3.
4.
5.
View the Web Access log and notice that this object was a miss.
Force the browser to reload the URL and view the results in the Web Access
Log.
What was this result?
6.
Go to the NetCache Manager (or the command line) and create a rule to
unconditionally cache:
http://pdc/cache/thirdtest.htm
7.
8.
9.
March 2003
Web Caching 35
(64.94.95.10)/cache/thirdtest.htm
10.
11.
Request the object again, then verify that it delivered from the NetCache.
Use either the CLI object command or the Web Access Log and verify that
the object of interest is in NetCache.
March 2003
Web Caching 36
IMS Rules
Build a rule that says no IMS
1.
Write an IMS rule that will ignore any IMS requirements for objects served
from the IIS server. You may use the NetCache Manager
(Setup>HTTP>Caching Behavior> IMS Rules) or the following command
line entries:
netcache>show config.http.caching.ims_rule_list
config.http.caching.ims_rule_list = \\
on ims every 31536000 and obey-httphdr
on no-ims if server-ip = 10.32.70.10
\\
2.
3.
Modify the default cacheablity rule shown above to establish IMS every 60
seconds.
Open a browser, proxy thru NetCache, then go to URL:
http://pdc/cache/fourthtest.htm
4.
Look at Web Access Log and view Last 45 lines, and observe no IMS steps,
as the second time access will just be a hit.
5.
Go to two or three external Web sites (other than the pdc) to generate some
log traffic.
6.
7.
March 2003
Web Caching 37
March 2003
Web Caching 38
March 2003
Web Caching 39