Configuring the CSS and Cache Engine for
ReverseβProxy Caching
Document ID: 12586
Contents
Introduction
Prerequisites
Requirements
Components Used
Conventions
Caching Overview
Content Caching
Configure
Network Diagram
Configurations
Verify
Troubleshoot
Troubleshooting Procedure
Related Information
Introduction
An increase in demand for information on the Internet causes congestion and long delays in the retrieval of
information. Much of the same information is retrieved over and over again. The save and local storage of
information, or caching, can satisfy subsequent requests with more efficiency and less bandwidth. This
document provides a sample configuration of the Cisco CSS Content Services Switch and Cisco Cache
Engine for reverseβproxy caching.
Prerequisites
Requirements
There are no specific requirements for this document.
Components Used
The information in this document is based on these software and hardware versions:
Cisco WebNS Software Version 6.10, Build 7
β’
Cisco Cache Software Releases 2.3, 2.31, and 2.5, and Cisco Application and Content Networking
System (ACNS) Software Version 5.1
β’
Microsoft Internet Information Server (IIS) on Microsoft Windows 2000
β’
Cisco CSS 11050 Content Services Switch
β’
Cisco 550 and 570 Cache Engines
β’
Note: The solution that this document describes works only with particular web servers and in particular
The information in this document was created from the devices in a specific lab environment. All of the
devices used in this document started with a cleared (default) configuration. If your network is live, make sure
that you understand the potential impact of any command.
Conventions
For more information on document conventions, refer to the Cisco Technical Tips Conventions.
Caching Overview
The save and local storage of information is known as caching. With web caching, a cache server temporarily
stores copies of recently requested content in locations that are topologically closer to the client. The content
is then readily available for client requests.
The local storage of content provides these advantages:
Optimize network resources
β’
Conserve network bandwidth
β’
Reduce Internet congestion
β’
Improve network response time and overall service quality
β’
Content Caching
You can make web caching costβeffective and more reliable if you deploy content caching in your network.
Content caching employs all the features and functions of the CSS. The CSS creates content rules to use your
cache servers and acts as a cache frontβend device because it performs these tasks:
Examines network traffic for web content requests
β’
Bypasses the cache automatically for noncacheable content
β’
Distributes content requests to maximize cache hits on services
β’
Bypasses the cache or redistributes content requests among the cache services that remain if a cache
service fails
β’
When a client requests content, the CSS intercepts the request for content. The CSS applies content
intelligence through the parse of the HTTP request header and distribution of content requests to the cache
servers.
Then, the CSS performs one of these tasks:
Directs the request to the appropriate cache
The CSS bases this decision on the loadβbalancing method that you specify in the content rule, for
example, the destination IP address.
β’
Bypasses the cache servers and forwards the request to the origin server
The CSS bypasses the cache servers if the content is deemed noncacheable.
β’
When the CSS directs the request to the cache server, the cache server either:
Returns the requested content, if the cache server has a local copy
β’
Sends a new request for the content through the CSS to the origin server that hosts the content
β’
the response to the client. If the content is cacheable, the cache saves a copy of the content for future requests.
When the requested content is found on a local cache server, the request is known as a cache hit. When the
requested content is not local and the cache initiates a new request for the content, the request is known as a
cache miss.
Configure
In this section, you are presented with the information to configure the features described in this document.
Note: To find additional information on the commands used in this document, use the Command Lookup
Tool (registered customers only) .
Network Diagram
This document uses this network setup:
Configurations
This document uses these configurations:
CSS 11050 That Runs WebNS 6.10, Build 7
β’
Cache Engine 1Β₯50 That Runs Cache Software Release 2.31
β’
Cache Engine 2Β₯70 That Runs Cache Software Release 2.3
β’
!Active version: ap0610007s configure
!*************************** GLOBAL *************************** username admin desβpassword lecfjgyezbeaxb2g superuser
username chip desβpassword lecfjgyezbeaxb2g superuser ip route 0.0.0.0 0.0.0.0 172.16.0.193 1
persistence reset remap
!βββ This is necessary for persistent connections that need to be !βββ remapped on the backβend connection.
!************************* INTERFACE ************************* interface ethernetβ6 phy 100MbitsβFD interface ethernetβ7 bridge vlan 2 interface ethernetβ8 bridge vlan 2 !************************** CIRCUIT ************************** circuit VLAN1 ip address 172.16.0.1 255.255.0.0 circuit VLAN2 ip address 10.1.1.1 255.255.255.0 !************************** SERVICE ************************** service ce1 ip address 172.16.0.200 type transparentβcache no cacheβbypass active service ce2 ip address 172.16.0.218 type transparentβcache
!βββ Disable the destination Network Address Translation (NAT). !βββ Only the destination MAC address changes.
no cacheβbypass
!βββ Permit traffic from the cache to hit a content rule.
active service webns1 ip address 10.1.1.3 active service webns2 ip address 10.1.1.5 active !**************************** EQL **************************** eql Cacheable extension pdf "Acrobat"
extension au "Sound audio/basic" extension bmp "Bitmap Image"
extension z "Compressed data application/xβcompress" extension gif "GIF Image image/gif"
extension html "Hypertext Markup Language text/html" extension htm
extension js "Java script application/xβjavascript" extension mocha
extension jpeg "JPEG image image/jpeg" extension jpg
extension jpe extension jfif extension pjpeg extension pjp
extension mp2 "MPEG Audio audio/xβmpeg" extension mpa
extension abs
extension mpeg "MPEG Video video/mpeg" extension mpg extension mpe extension mpv extension vbs extension m1v extension pcx "PCX Image"
extension txt "Plain text text/plain" extension text
extension mov "QuickTime video/quicktime" extension tiff "TIFF Image image/tiff"
extension tar "Unix Tape Archive application/xβtar" extension avi "Video for Windows video/xβmsvideo" extension wav "Wave File audio/xβwav"
extension gz "application/xβgzip"
extension zip "ZIP file application/xβzipβcompressed"
description "This EQL contains extensions of cacheable content" !*************************** OWNER *************************** owner chip
content cache_request_rule add service webns1 add service webns2 vip address 172.16.0.198 protocol tcp
port 80 url "/*" active
!βββ This content rule catches requests from the cache !βββ and load balances the requests to the web servers.
content reverse_proxy_rule add service ce1
add service ce2
vip address 172.16.0.237 protocol tcp
port 80
url "/*" eql Cacheable
!βββ Only objects that match an extension that is in
!βββ the Extension Qualifier List (EQL) Cacheable use this rule.
active
content web_server_rule add service webns1 add service webns2
protocol tcp port 80 url "/*"
vip address 172.16.0.237 active
!βββ When the request does not match any extension that appears !βββ in the EQL Cacheable, the request goes directly to the servers.
Cache Engine 1Β₯50 That Runs Cache Software Release 2.31
Current configuration: !
! !
user add admin uid 0 password 1 "eeSdy9dcy" capability adminβaccess ! ! ! hostname ce1 ! interface ethernet 0 ip address 172.16.0.200 255.255.0.0 ip broadcastβaddress 172.16.255.255 exit ! interface ethernet 1 exit ! ip defaultβgateway 172.16.0.1 ip nameβserver 171.70.32.127 ip domainβname chip.com ip route 0.0.0.0 0.0.0.0 172.16.0.1 cron file /local/etc/crontab
!
no bypass load enable
http proxy incoming 80
!βββ This http proxy incoming 80 command is !βββ necessary in software releases 2.31 and 2.50.
http l4βswitch enable
!βββ Enable l4βswitch so that the cache accepts connections on any !βββ IP address, even if the address is not configured on the cache.
!
authentication login local enable
authentication configuration local enable
rule useβproxy 172.16.0.198 80 domain www.chip.com
!βββ This command sends all requests for the domain
!βββ www.chip.com to the web server virtual IP (VIP) on the CSS. !βββ Another solution is to issue the
!βββ http proxy outgoing host 172.16.0.198 80 command.
!
rule noβcache urlβregex .*cgiβbin.* rule noβcache urlβregex .*awβcgi.* !
! end
Cache Engine 2Β₯70 That Runs Cache Software Release 2.3
Current configuration: ! ! no logging console !user add admin uid 0 capability adminβaccess ! ! ! hostname ceβ2 ! interface ethernet 0 ip address 172.16.0.218 255.255.0.0 ip broadcastβaddress 172.16.255.255 exit ! ! interface ethernet 1 exit ! ip defaultβgateway 172.16.0.1 ip nameβserver 171.70.32.127 ip domainβname chip.com ip route 0.0.0.0 0.0.0.0 172.16.0.1 cron file /local/etc/crontab
!
no bypass load enable http l4βswitch enable !
authentication login local enable
authentication configuration local enable
rule useβproxy 172.16.0.198 80 domain www.chip.com
!βββ This command sends all requests for the domain !βββ www.chip.com to the web server VIP on the CSS.
rule noβcache urlβregex .*cgiβbin.* rule noβcache urlβregex .*awβcgi.* !
! end
Verify
This section provides information you can use to confirm your configuration is working properly.
Note: Certain show commands are supported by the Output Interpreter Tool (registered customers only) ,
which allows you to view an analysis of show command output.
CSS show Commands
show summaryDisplays the relationship between owners, content rules, and services
β’
show service summaryDisplays summary information for all services
This information includes the service state, connections, weight, and load.
β’
show ruleDisplays all content rules for a specific owner or for all owners
The screen shows information about the owner and the content rules. If you are in owner mode, the
show rule command displays the summary for the current owner.
Cache Engine show Commands
show statistics http savingsDisplays HTTP savings statistics
β’
show statistics http requestsDisplays HTTP requests statistics
β’
show statistics rule allDisplays all rule statistics
β’
show statistics http missβreasonDisplays details of the reasons that the cache did not have a copy
of the requested content
β’
Troubleshoot
This section provides information you can use to troubleshoot your configuration.
Troubleshooting Procedure
Complete these steps to troubleshoot your configuration:
In order to detect if traffic hits the correct content rule on the CSS, issue the show summary
command.
Global Bypass Counters:
No Rule Bypass Count: 0
Acl Bypass Count: 0
Owner Content Rules State Services Service Hits chip web_server_rule Active webns1 5
webns2 6
reverse_proxy_rule Active ce1 7
ce2 4
cache_request_rule Active webns1 10
webns2 9
If there is no hit, check for connectivity issues.
β¦
If there is no hit for the
reverse_proxy_rule
, check the EQL setup.
β¦
If there is no hit for the
cache_request_rule
, check the configuration of the caches.
β¦
1.
In order to check for HTTP requests, issue the show statistics http requests command on the cache.
show statistics http requests Statistics β Requests Total % of Requests βββββββββββββββββββββββββββββββββββββββββββββββββββ Total Received Requests: 6 β Forced Reloads: 0 0.0 Client Errors: 0 0.0 Server Errors: 0 0.0 URL Blocked (Reset): 0 0.0 URL Blocked: 0 0.0 Sent to Outgoing Proxy: 4 66.7 Failures from Outgoing Proxy: 0 0.0 Excluded from Outgoing Proxy: 0 0.0 ICP Client Hits: 0 0.0 ICP Server Hits: 0 0.0 IfβRange Hits: 0 0.0 HTTP 0.9 Requests: 0 0.0 HTTP 1.0 Requests: 0 0.0 HTTP 1.1 Requests: 6 100.0 HTTP Unknown Requests: 0 0.0 Non HTTP Requests: 0 0.0 Non HTTP Responses: 0 0.02.
Chunked HTTP Responses: 0 0.0 Http Miss Due To DNS: 0 0.0 Http Deletes Due To DNS: 0 0.0 Objects cached for min ttl: 0 0.0
If you do not see any requests, issue the http l4βswitch enable command.
β¦
In order to determine if the cache is caching the request correctly, issue the show statistics http
savings command.
show statistics http savings
Statistics β Savings Requests Bytes βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ Total: 6 11293008 Hits: 2 3795880 Miss: 4 7497128 Savings: 33.3 % 33.6 %
If the number of misses is high, issue the show statistics http missβreason command to
determine the reason.
show statistics http missβreason Statistics β No hit reasons Reason: No. of Requests βββββββββββββββββββββββββββββββββββββββββββββββββββ not_in_cache: 1 dmbuf_low: 0 none_get_method: 0 ftp_not_anonymous: 0 http_not_anonymous: 0 suspicious_url: 0 ie_5_ims: 0 has_if_match: 0 has_invalid_if_range: 0 has_if_unmodified_since: 0 has_invalid_range: 0 has_more_than_supported_range: 0 has_pragma_no_cache: 0 has_authorization: 0 has_cache_control_no_cache: 0 is_https: 0 invalid_ims: 0 cert_check_fail: 0 second_validation: 0 invalid_ims_reply: 0 ims_200_reply: 0 xfs_open_error: 0 has_unknown_length_transfer_pending: 0 object_in_cache_older_than_clients: 0 object_in_cache_expired_cannot_verified: 0 different_protocol: 0 other_error: 0Statistics β Validate reasons Reason: No. of Requests βββββββββββββββββββββββββββββββββββββββββββββββββββ reval_all: 0 reval_text: 0 max_age: 0 min_fresh: 0 max_stale: 0 response_say_so: 0 object_expired: 0 reval_no_cache_req: 0
β¦
3.
rule_refresh: 0
Statistics β No store reasons Reason: No. of Requests βββββββββββββββββββββββββββββββββββββββββββββββββββ dmbuf_low: 0 none_get_method: 0 ftp_not_anonymous: 0 http_not_anonymous: 0 suspicious_url: 0 has_range: 1 has_authorization: 0 has_cache_control_no_store: 0 invalid_ims: 0 cert_check_fail: 0 second_validation: 0 invalid_ims_reply: 0 url_too_long: 0 http_0_9_reply: 0 header_too_long: 0 http_unknown_verion_reply: 0 http_none_cachable_reply_status: 1 http_unknow_reply_status: 0 has_cookie: 3 object_too_big: 0 has_pragma_no_cache: 0 cache_control_no_cache: 0 cache_control_no_store: 0 cache_control_private: 0 has_multipart: 0 invalid_expire: 0 invalid_last_modified: 0 invalid_date: 0 content_length_0: 0 has_vary: 0 transfer_encoding: 0 three_to_two_way: 0 xfs_open_error: 0 has_unknown_length_transfer_pending: 0 other_error: 0 weird_server_pipe_though: 0 incorrect_content_length: 0 rule_no_store: 0
When you know the reason for a miss or a
No store
, you can try to correct the problem.
For example, in this case, there are a number of hits against
has_cookie
. In order to
resolve this, issue the http cacheβcookies command on the cache.
Related Information
Cisco Cache Software
β’
Technical Support & Documentation β Cisco Systems
β’
Contacts & Feedback | Help | Site Map
Β© 2014 β 2015 Cisco Systems, Inc. All rights reserved. Terms & Conditions | Privacy Statement | Cookie Policy | Trademarks of Cisco Systems, Inc.