• No results found

Configuring the CSS and Cache Engine for Reverse Proxy Caching

N/A
N/A
Protected

Academic year: 2021

Share "Configuring the CSS and Cache Engine for Reverse Proxy Caching"

Copied!
10
0
0

Loading.... (view fulltext now)

Full text

(1)

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

(2)

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

β€’

(3)

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

β€’

(4)

!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"

(5)

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

(6)

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

(7)

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.

(8)

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.0

2.

(9)

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: 0

Statistics βˆ’ 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.

(10)

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.

References

Related documents

Therefore, this study defined juvenile delinquents as a high-risk group, and the aims were: (1) to identify the prevalence of suicidal ideation among inmates in youth

The result of stepwise regression of ill health on housing conditions (Table 3) indicated that the housing indicators: building condition, indoor temperature controls,

The groups of services under each outcome (Frequency of Use, Convenience, and Satisfaction) consisted of similar types of service, and held similar patterns in relation to

Thus for these activities, constraint set 2.6 implies that a train can only depart on a track of an open track section if a train has departed on the same track in the same

We obtain the rst fully polynomial randomized approximation scheme (FPRAS) for a broad class of multi-stage stochastic linear programming prob- lems with any constant number of

Methods: Fifty-four patients with pathologically confirmed ovarian cancer were randomly divided into a combined treatment (intravenous pump of rh-endostatin ΓΎ TP regimen) group and

Importantly, CXCL12-CXCR4 interaction has been shown to promote colonization of the bone marrow by hematopoietic stem cells and gonads by primordial germ

50% of inspiratory displacement divided by TA expiratory displacement rate at 50% of expiratory displacement; IQR, interquartile range; MWU, Mann-Whitney-U; rCT, relative