RE: [users@httpd] using cache in reverse proxy mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It does look like it caches the response, however, for whatever reason it seems fit to revalidate the cached contents for every request. That could be due to some request header... Your traces did not show the request headers.

-ascs 

-----Original Message-----
From: Yavor Trapkov [mailto:trapkov@xxxxxxxxxxxx] 
Sent: Monday, October 24, 2005 11:08 PM
To: users@xxxxxxxxxxxxxxxx
Subject: RE: [users@httpd] using cache in reverse proxy mode

I put

CacheIgnoreCacheControl on
CacheIgnoreNoLastMod    on
CacheIgnoreHeaders set-cookie

and now debug LogLevel showes the content is cached, but some things doesn't make much sense:

with disk cache: each time I send a request I get 


[Mon Oct 24 22:47:13 2005] [debug] mod_cache.c(114): incoming request is asking for a uncached version of /index.jsp, but we know better and are ignoring it
[Mon Oct 24 22:47:13 2005] [debug] mod_disk_cache.c(371): disk_cache: Recalled cached URL info header server.domain.com/index.jsp?
[Mon Oct 24 22:47:13 2005] [debug] mod_disk_cache.c(502): disk_cache: Recalled headers for URL server.domain.com/index.jsp?
[Mon Oct 24 22:47:13 2005] [debug] proxy_http.c(67): proxy: HTTP: canonicalising URL //server.domain.com:8080/index.jsp
[Mon Oct 24 22:47:13 2005] [debug] mod_proxy.c(418): Trying to run scheme_handler
[Mon Oct 24 22:47:13 2005] [debug] proxy_http.c(1059): proxy: HTTP: serving URL http://server.domain.com:8080/index.jsp
[Mon Oct 24 22:47:13 2005] [debug] proxy_http.c(186): proxy: HTTP connecting http://server.domain.com:8080/index.jsp to server.domain.com:8080
[Mon Oct 24 22:47:13 2005] [debug] proxy_util.c(1139): proxy: HTTP: fam 2 socket created to connect to server.domain.com
[Mon Oct 24 22:47:13 2005] [debug] proxy_http.c(336): proxy: socket is connected
[Mon Oct 24 22:47:13 2005] [debug] proxy_http.c(370): proxy: connection complete to x.x.x.x:8080 (server.domain.com)
[Mon Oct 24 22:47:13 2005] [debug] proxy_http.c(893): proxy: start body send
[Mon Oct 24 22:47:13 2005] [debug] mod_cache.c(556): cache: Caching url: /index.jsp
[Mon Oct 24 22:47:13 2005] [debug] mod_disk_cache.c(645): disk_cache: Stored headers for URL server.domain.com/index.jsp?
[Mon Oct 24 22:47:13 2005] [debug] mod_disk_cache.c(747): disk_cache: Body for URL server.domain.com/index.jsp? cached.
[Mon Oct 24 22:47:13 2005] [debug] proxy_http.c(953): proxy: end body send

i.e. each time I request the document it's requested from the application server, and then cached again, it seems it's never server from the cache ?!?

If I use mem cache: it behaves in a similar way, the difference is that every 4-5 hits I get

mod_cache.c(220): cache: running CACHE_OUT filter
mod_cache.c(229): cache: serving /index.jsp

but then again it targets the application server

Shouldn't it server the already cached document from the disk/mem cache and not sending requests to the application server, at least that's what I'm trying to achieve - to reduse the load of the application servers.

Another point, what will happen if the application server is not responding, then ideally the cached page should be shown.

Regards
Yavor

Axel-Stéphane  SMORGRAV <Axel-Stephane.SMORGRAV@xxxxxxxxxxxxxx> wrote:

>The first response is not cacheable. It contains no cache validator (Etag, Last-Modified, Expires). The second is cacheable.
>
>You must disable cacheing of Set-Cookie using "CacheIgnoreHeaders set-cookies"
>
>With LogLevel debug you will get all the traces you need to understand why a response does not get cached.
>
>I would not use memory cache with Apache 2.0.54. I used it without problems with Apache 2.0.49, but I ran into core dumps in Apache 2.0.54. Probably does not do you much good anyway.
>
>-ascs
>
>-----Original Message-----
>From: Yavor Trapkov [mailto:trapkov@xxxxxxxxxxxx]
>Sent: Saturday, October 22, 2005 9:54 PM
>To: users@xxxxxxxxxxxxxxxx
>Subject: Re: [users@httpd] using cache in reverse proxy mode
>
>Good point!, but it doesn't seems to be marked uncachable, here are two examples
>
>------------
>HTTP request sent, awaiting response...
>  HTTP/1.1 200 OK
>  Set-Cookie: JSESSIONID=8A211D396681857816C48E62C2E0D8A5; Path=/
>  Content-Type: text/html;charset=ISO-8859-1
>  Content-Length: 18
>  Date: Sat, 22 Oct 2005 19:47:57 GMT
>  Server: Apache-Coyote/1.1
>  Connection: Keep-Alive
>Length: 18 [text/html]
>
>21:47:49 (676.08 KB/s) - `index.jsp' saved [18/18]
>
>----------------
>HTTP request sent, awaiting response...
>  HTTP/1.1 200 OK
>  ETag: W/"18-1130009410000"
>  Last-Modified: Sat, 22 Oct 2005 19:30:10 GMT
>  Content-Type: text/html
>  Content-Length: 18
>  Date: Sat, 22 Oct 2005 19:48:06 GMT
>  Server: Apache-Coyote/1.1
>  Connection: Keep-Alive
>Length: 18 [text/html]
>
>21:47:58 (258.50 KB/s) - `index.html' saved [18/18]
>
>
>
>---------------------------------------------------------------------
>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@xxxxxxxxxxxxxxxx
>   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
>For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
>


-- 
Yavor Trapkov
visit me at 
http://trapkov.homelinux.org
icq: 2030035


__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux