httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul <paul.ma...@gmail.com>
Subject [users@httpd] mod_cache in front of a proxy-balancer backend questions
Date Thu, 04 Jan 2007 14:48:12 GMT
 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, application/xml or whatever is appropriate.

Also it seems that sometimes headers come back that show the backend
was not hit.  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.

However opening up the page in a different browser results in again
"Server: Backend"

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

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message