Yongming,

Thanks for the response.  I have reviewed the Apache Traffic Server 4.0.2 
documentation as well as all the configuration parameters carefully.  I was 
able to get Hierarchical Caching working successfully with some trial and error 
testing.  Note that these are just parameters that have been changed for a test 
system and will be adjusted accordingly for production.  Also, these are 
parameters that I used and may not work for your configuration.  I hope this 
helps anyone in the future.  Thanks to everyone.

Test Configuration


*         2 Origin Servers with Apache Web Server 2.2.15

*         2 Parent Servers with Apache Traffic Server 4.0.2

*         2 Edge Servers with Apache Traffic Server 4.0.2

Ken

Apache Traffic Server 4.0.2 Hierarchical Caching Parameters

cache.config

Parent

dest_domain=. action=ignore-no-cache
dest_domain=. ttl-in-cache=3d
dest_domain=. revalidate=1h

Child

dest_domain=. action=ignore-no-cache
dest_domain=. ttl-in-cache=3d
dest_domain=. revalidate=1h


parent.config

Parent

dest_domain=. parent=”origin.mydomain.com:80"

Child

dest_domain=. parent=origin.mydomain.com:80"


records.config

Parent

CONFIG proxy.config.http.server_ports STRING 80
CONFIG proxy.config.http.parent_proxy_routing_enable INT 1
CONFIG proxy.config.http.background_fill_active_timeout INT 0
CONFIG proxy.config.http.background_fill_completed_threshold FLOAT 0.000000
CONFIG proxy.config.http.cache.ignore_server_no_cache INT 1
CONFIG proxy.config.http.normalize_ae_gzip INT 1
CONFIG proxy.config.http.cache.required_headers INT 0
CONFIG proxy.config.cache.permit.pinning INT 1
CONFIG proxy.config.cache.ram_cache.size INT 32G
CONFIG proxy.config.cache.ram_cache.algorithm INT 1
CONFIG proxy.config.cache.enable_read_while_writer INT 1
CONFIG proxy.config.reverse_proxy.enabled INT 0
CONFIG proxy.config.url_remap.remap_required INT 0

Child

CONFIG proxy.config.http.server_ports STRING 80
CONFIG proxy.config.http.parent_proxy_routing_enable INT 1
CONFIG proxy.config.http.background_fill_active_timeout INT 0
CONFIG proxy.config.http.background_fill_completed_threshold FLOAT 0.000000
CONFIG proxy.config.http.cache.ignore_server_no_cache INT 1
CONFIG proxy.config.http.normalize_ae_gzip INT 1
CONFIG proxy.config.http.cache.required_headers INT 0
CONFIG proxy.config.cache.permit.pinning INT 1
CONFIG proxy.config.cache.ram_cache.size INT 32G
CONFIG proxy.config.cache.ram_cache.algorithm INT 1
CONFIG proxy.config.cache.enable_read_while_writer INT 1
CONFIG proxy.config.reverse_proxy.enabled INT 0
CONFIG proxy.config.url_remap.remap_required INT 0

storage.config

Parent

Remove file system cache:

  var/trafficserver 256M

Add raw device cache:

/dev/sdc
/dev/sdd

Child

Remove file system cache:

  var/trafficserver 256M

Add raw device cache:

/dev/sdc
/dev/sdd


From: Yongming Zhao [mailto:[email protected]]
Sent: Saturday, November 16, 2013 11:21 AM
To: [email protected]
Subject: Re: Serving Content out of Cache

that sounds not as expected, but we need more detail to give you some advise, 
for example what your response header your origin server send.

and we find that most of new coming to ATS will have trouble deal with the 
cache & no cache issue, and most of the config options in records.config 
already:
   #################
   # cache control #
   #################

for example, if your origin server send you responses with cookies:

   # cache responses to cookies has 5 options:
   #   0 - do not cache any responses to cookies
   #   1 - cache for any content-type
   #   2 - cache only for image types
   #   3 - cache for all but text content-types
   #   4 - cache for all but text content-types except OS response
   #       without "Set-Cookie" or with "Cache-Control: public"
   # See also cache-responses-to-cookies in cache.config.
CONFIG proxy.config.http.cache.cache_responses_to_cookies INT 1

and the basic rules for how to get the content cached:

   # required headers: three options:
   #   0 - No required headers to make document cachable
   #   1 - "Last-Modified:", "Expires:", or "Cache-Control: max-age" required
   #   2 - explicit lifetime required, "Expires:" or "Cache-Control: max-age"
CONFIG proxy.config.http.cache.required_headers INT 2


all those config directives and option values listed in “cache control" should 
be examined carefully, please refer to the online and in source documents.

thanks

在 2013年11月15日,上午4:51,Chin, Kenneth (HBO) 
<[email protected]<mailto:[email protected]>> 写道:


Hello,

I have an Apache Traffic Server 4.0.2 hierarchical caching system.  I set the 
records.config file to ignore both client and server no-cache directives.  I 
want the child server to send content from its cache to a client web browser.  
However, the child server always goes to the parent server and the parent 
server to the origin to send content.  As I understand the parameters:

CONFIG proxy.config.http.cache.ignore_client_no_cache INT 1
CONFIG proxy.config.http.cache.ims_on_client_no_cache INT 1
CONFIG proxy.config.http.cache.ignore_server_no_cache INT 1

the child server is supposed to ignore the cache directive and serve the 
content directly from the child server’s cache and not from the origin server.  
I am using raw disks for cache and see the content being stored in disk cache 
the first time a client requests the content.  The second client should get 
content from the child server’s cache but does not.

Thanks

Ken

---------------------------------------------------------------------
This e-mail is intended only for the use of the addressees. Any copying, 
forwarding, printing or other use of this e-mail by persons other than the 
addressees is not authorized. This e-mail may contain information that is 
privileged, confidential and exempt from disclosure. If you are not the 
intended recipient, please notify us immediately by return e-mail (including 
the original message in your reply) and then delete and discard all copies of 
the e-mail.

Thank you.

---------------------------------------------------------------------

---------------------------------------------------------------------
This e-mail is intended only for the use of the addressees.  Any copying,
forwarding, printing or other use of this e-mail by persons other than the
addressees is not authorized.  This e-mail may contain information that is
privileged, confidential and exempt from disclosure. If you are not the intended
recipient, please notify us immediately by return e-mail (including the original
message in your reply) and then delete and discard all copies of the e-mail. 

Thank you.

---------------------------------------------------------------------

Reply via email to