mod_cache in front of a proxy-balancer backend

This is a discussion on mod_cache in front of a proxy-balancer backend within the Linux Web Servers forums, part of the Web Server and Related Forums category; I'm trying to get a mod_disk_cache setup to proxy the content generated by a proxy-balanced backend but am ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-04-2007
paul.marsh@gmail.com
 
Posts: n/a
Default mod_cache in front of a proxy-balancer backend

I'm trying to get a mod_disk_cache setup to proxy the content
generated by a proxy-balanced backend but am running into some
problems.

Here is a snip of the .conf

################ CONF ####################
IfModule mod_cache.c>
<IfModule mod_disk_cache.c>
UseCanonicalName On
CacheRoot /pagecache
CacheEnable disk /
CacheDisable /image_assets
CacheDisable /images
CacheDisable /pictures
CacheDisable /flash
CacheIgnoreNoLastMod On
CacheIgnoreCacheControl Off
CacheIgnoreHeaders Set-Cookie
CacheDefaultExpire 360
CacheDirLevels 2
CacheDirLength 1
</IfModule>
</IfModule>

<Proxy balancer://sitev2_cluster>
ExpiresActive On
ExpiresDefault A86400
ExpiresByType application/xml A600
ExpiresByType text/xml A300
ExpiresByType text/html A300
ExpiresByType image/x-icon A2592000
ExpiresByType text/javascript A644800
ExpiresByType text/css A644800
ExpiresByType image/gif A604800
ExpiresByType image/png A604800
ExpiresByType image/jpeg A604800
ExpiresByType application/x-shockwave-flash A604800
ExpiresByType video/x-flv A604800
ExpiresByType application/pdf A604800
Header set Cache-Control "must-revalidate"
Header unset Vary
BalancerMember http://127.0.0.1:7000
BalancerMember http://127.0.0.1:7001
BalancerMember http://127.0.0.1:7002
</Proxy>

ProxyPass / balancer://sitev2_cluster/
ProxyPassReverse / balancer://sitev2_cluster/
ProxyRequests Off

################ END CONF ####################

Now files are being written to /pagecache so it appears to work until
you look at the headers and log that the backend generates. It seems
that it still gets hit for content that should be cached. For example
the homepage will show up as being requested in the backend logs at
01:05:00 that should then be picked up and used by Apache for 5minutes
right?

Instead I'll see more requests for it at 01:05:10 01:05:30 01:06:00
etc. Does Apache check with the backend for some reason before serving
up the cached version?

The backend doesn't write files itself but does return a Content-Type:
for text/html or application/xml whatever is appropriate.

Also it seems that sometimes headers come back that show the backend
was not hit. However if visiting from IE and then in Firefox it seems
that a separate cache is created for each browser. Meaning the first
set of headers sent to the browsers send a Server: Backend but on
reloading the page the Server: Apache 2.2.3 shows up.

Anyone having any experience with this type of setup I'd really
appreciate hearing from you.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:54 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0