integratedcacheonnetscaler-120705075853-phpapp02
integratedcacheonnetscaler-120705075853-phpapp02
Netscaler Webinar
Mark Hillick
Agenda of Cash, sorry Cache
• Goals of Caching
• Cache Policies
• IC configuration
example
• Cache Statistics
• Troubleshooting IC
© 2007 Citrix Systems, Inc. — All rights reserved 2
Presentation Goal
• Goal => remove the need to send full responses in many other
cases.
1. Saves Bandwidth
SSL Decrypt
HTTP Parsing
AAA Processing
Cache Redirection
Content Switching
Application Firewall
Responder Action?
Cache Hit?
Load Balancing
Content Filtering
Proxy
Proxy
Proxy Cache
(Saves copy)
Proxy
HTTP/1.1 200 OK
Last-Modified: Thu, ...
Content-Length: 3688
Content-Type: text/html
Proxy Cache
(Fresh copy!)
• HTTP/1.1 200 OK
………
• Via: NS-CACHE-9.2: 65
• ETag: "23834-b1-4951a45768b8d"
• Server: Apache/2.2.14 (Ubuntu)
......... OR .........
• ETag: "23834-b1-4951a45768b8d"
• 2011-04-26 18:22:56 ERROR 304: Not Modified.
………
• $ wget -S --header="If-None-Match:23834-b1-4951a45768b8d" -U
Mozilla http://10.90.196.68/index.html
……….
• HTTP/1.1 200 OK
• Date: Wed, 27 Apr 2011 09:30:59 GMT
• Server: Apache/2.2.14 (Ubuntu)
• Last-Modified: Mon, 15 Nov 2010 16:52:53 GMT
………..
• Saving to: `index.html.41
qSaves time
• Cache-Control: max-age=3600
• If-Modified-Since <Date>
• If-None-Match <Etag>
Proxy Cache
(Saves copy)
• MAY_CACHE, MAY_NOCACHE
q Cache decision @ response time
• Invalidate
q Invalidate will invalidate the object/"all objects in contentgroup".
q But the way it is done is it is optimized such a way that we don't look at
each object and remove it but when you run expire command or when new
request comes for the invalid object, it is then removed.
• Expire
q Only mark the object as expired
q Request comes in & instead of getting full response (i.e what we do for
invalid object) we will send if-modified-since/if-none-match conditional
request to back-end server. i.e can receive a 304.
q POWERFUL
• Cache controls
qNo cache depending on size or hits
qMem limit usage per group
• Works with FC J but probably not wise on significant groupsExpire
after complete response received
• Use grep – POWERFUL for parsing output for hits, misses etc.
• Paros (as a proxy in the middle) -> I now use Zap (Owasp project fork of
Paros)
• http://support.citrix.com/article/CTX124553 - how to IC
• http://support.citrix.com/article/CTX123753 - compressed
content to unadvertised clients
• http://support.citrix.com/article/CTX126557 - caching
uncompressed & compressed content of same file
• http://support.citrix.com/article/CTX128801 - same
hostname/object but different vip twice
• http://support.citrix.com/article/CTX129118 - has my HTTP
callout been cached
• http://support.citrix.com/article/CTX124718 - cache callout
response
• http://support.citrix.com/article/CTX129734 - Soft Cache
Expiry
• You can use perl, curl, wget, browser add-ons but I like wget –
q http://www.cyberciti.biz/tips/linux-wget-your-ultimate-
command-line-downloader.html
q http://www.computerhope.com/unix/wget.htm
q Google “wget site:www.linuxquestions.org”
q Easy to write a basic shell script around it & doesn’t need
to be too complicated