Re: mod_proxy Cache-Control: no-cache=directive support Apache 1.3

2002-02-27 Thread Eli Marmor

Let me try to contribute my $0.02 to the discussion:

[Like Graham, I prefer to ignore the word 1.3 in the subject line...]

Originally, there was a need to INTEGRATE two modules in order to enjoy
the features of both.

Later, thanks to the filtering infrastructure, it is possible to do
without a real merge. You still need to change some things in the
original module (and of course, to port the additional module to be a
filter rather than a simple module), but the two modules/filters can
live together, side by side.

Then, integration with mod_proxy still needed, because the connection
of mod_proxy with the backend server was still done directly, and not
through the filtering infrastructure.

Now, that this issue is being resolved too, it's the time to try to add
features to mod_proxy WITHOUT modifying it (well, you still need some
minor fixes in mod_proxy. For example, if it removes a header, no
filter can do anything about it...).


Trying to add so many features to mod_proxy, may meet the objection of
members here, who want a simple and stable mod_proxy, and may fear that
all of these additions may make mod_proxy a monster (even if it's not
true).

I think that the right way to advance this idea (to integrate both
modules), is to make mod_accel a filter. I don't have any experience
with mod_accel, so I can't promise that it's possible; However, in the
worst case, we can add filters to both sides (between the client and
the proxy, and between the proxy and the backend), plus some minor
fixes to mod_proxy, the sky is the limit...

Of course, you have to deal with many filtering chains, even 4 (2 types
- input/output, in 2 sides - between the proxy and the client, and
between the proxy and the backend), and even more (when headers can't
be manipulated in the same filter as the input/output one).

I, for myself, am going to play with adding filters to the sessions
between the proxy and the backend; I think that some cool things can be
done using it.
-- 
Eli Marmor
[EMAIL PROTECTED]
CTO, Founder
Netmask (El-Mar) Internet Technologies Ltd.
__
Tel.:   +972-9-766-1020  8 Yad-Harutzim St.
Fax.:   +972-9-766-1314  P.O.B. 7004
Mobile: +972-50-23-7338  Kfar-Saba 44641, Israel



Re: mod_proxy Cache-Control: no-cache=directive support Apache 1.3

2002-02-26 Thread Joseph Wayne Norton


Graham -

At Wed, 27 Feb 2002 06:36:45 +0200,
Graham Leggett wrote:
 
 [1  text/plain; us-ascii (7bit)]
 Joseph Wayne Norton wrote:
 
  In conjunction with mod_rewrite as url filter, I would like to be able
  to use mod_accel as a proxy for only the http request portion of a
  client request and allow for the http response portion to be served
  directly from the backend to the client.  This would be useful in
  situations where the response does not (or should not) have to be
  cached by the mod_accel cache.  However, I think this type of
  tcp-handoff cannot be performed soley by an application process such
  as apache.  Have you a similiar requirement or experience?
 
 The request and response come after the other on the same connection, so
 what you're asking to do is impossible. What exactly are you trying to
 achieve?
 
 If you don't want a response to be cached, use the Pragma: no-cache and
 Cache-Control: headers correctly.
 

Yes, I understand that what I'm asking to do is impossible with the
same connection.  I'm interested in learning how to build a better web
server cluster to support dynamic content (generated by backend
servers).  I have run across the following paper ...

 http://www.crpc.rice.edu/softlib/scalableRD.html#papers

entitled Scalable Content-aware Request Distribution   I found
it to be quite interesting.  It presents a scalable method for
distributing the operaton of tcp connection and handoff among back-end
nodes rather than relying entirely on a centralized node.  It also
helps solves an issue of trying to keep a single, web client's
session to being served by a particular back-end node (this helps
with cacheing).

The paper discusses about having a Distributor component and a
Server component.  I have simply been thinking about how this
Distributor component could be implemented by using apache's
mod_rewrite, mod_proxy, and mod_cache modules.  The Server component
would be a backend server that is proxied by mod_proxy (or mod_accel).

For dynamic content that has been cached or can be cached, the
Distributor component would simply send the response back to the
client (as mod_proxy does now after talking with the backend).  For
dynamic content that cannot be cached or doesn't need to be cached,
the Distributor would implement a form of TCP handoff that would
allow the backend to serve the response directly to the client.  This
later step probably cannot be done without some additional
kernel-level module.

Anyway, my questions are just ideas right now ... nothing more.


   mod_proxy is very ancient module and it's hard to maintain it.
  
  
  Is it possible to integrate apache 2.0's mod_cache with mod_accel
  and/or add mod_accel's features to mod_proxy?
 
 Mod_proxy is no longer ancient nor hard to maintain, and as far as I am
 aware the new mod_proxy does almost everything mod_accel does - if it
 doesn't, tell me what's broken and I'll try to fix it.
 

I haven't spent any time examining the source (or trying to extend) of
mod_proxy or mod_accel so I am not able to judge either module.  

The 2 main points that I picked up from Igor's mail that I'm not sure
if mod_proxy supports or not:

 a. It frees backend as soon as possible. mod_proxy can keep busy
   backend with slow client, i.e, using mod_proxy to accelerate
   backend is not worked with slow clients .

 b. It can use busy locks and limit number of connection to
   backend.

One additional feature that I would like to have with mod_proxy is to
have a way to install error_handler documents for all or individual
backends.  This would allow apache to return a customized error page
for individual backends for cases when the backend is not reachable,
etc.

I hope that I have made myself clear.  Any thoughts or comments?

Regards,

- jn





Re: mod_proxy Cache-Control: no-cache=directive support Apache 1.3

2002-02-21 Thread Joseph Wayne Norton


Igor -

After I read your posting, I downloaded but haven't tried to install
the mod_accel.  From you description, it looks like a very, powerful
module with pretty much the features that I have been looking for.
Can mod_accel work with the mod_rewrite module (in a fashion similar?

In conjunction with mod_rewrite as url filter, I would like to be able
to use mod_accel as a proxy for only the http request portion of a
client request and allow for the http response portion to be served
directly from the backend to the client.  This would be useful in
situations where the response does not (or should not) have to be
cached by the mod_accel cache.  However, I think this type of
tcp-handoff cannot be performed soley by an application process such
as apache.  Have you a similiar requirement or experience?

At Tue, 19 Feb 2002 14:49:44 +0300 (MSK),
Igor Sysoev wrote:

 mod_proxy is very ancient module and it's hard to maintain it.
 

Is it possible to integrate apache 2.0's mod_cache with mod_accel
and/or add mod_accel's features to mod_proxy?

thanks,

- Joe N.




mod_proxy Cache-Control: no-cache=directive support Apache 1.3

2002-02-19 Thread Fowler, Brian




Hi,

Due to a requirement on a project we are currently 
working on involving using Apache as a caching reverse proxy server to WebLogic. 


We are considering implementing the

Cache-Control: 
no-cache=directive

for the Apache 1.3 mod_proxy module so allow us to 
prevent the caching of certain headers served by WebLogic. (In particular the 
session cookie.)

Has/is anyone working in this area? Is there any 
specific reason why this has deliberately not been implemented already? (E.g. 
performance hit?) Any views on this directive?

Thanks,

Brian 

Logica UK Ltd.


This e-mail and any attachment is for authorised use by the intended recipient(s) only.  It may contain proprietary material, confidential information and/or be subject to legal privilege.  It should not be copied, disclosed to, retained or used by, any other party.  If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.  Thank you.



RE: mod_proxy Cache-Control: no-cache=directive support Apache 1.3

2002-02-19 Thread Fowler, Brian


Hi Graham,

I don't think mod_proxy does currently conform to RFC2616 in respect of 
Cache-Control: no-cache=directive

It preventing the caching of specific headers, I can't find any code
implementing this in the mod_proxy distribution and the following example
fails...

I have a small test.jsp which just sets Expires, Last-Modified and
Cache-Control: no-cache=Set-Cookie headers
and configured Apache to act as a Reverse Proxy Server for the page. With an
empty cache the initial request gives ...

~ GET -edP http://FCODEVWS2/communities/test.jsp;
Cache-Control: no-cache=Set-Cookie
Connection: close
Date: Tue, 19 Feb 2002 12:37:33 GMT
Server: Apache/1.3.23 (Win32)
Content-Length: 8
Content-Type: text/html
Expires: Tue, 19 Feb 2002 13:06:34 GMT
Last-Modified: Tue, 19 Feb 2002 12:06:34 GMT
Client-Date: Tue, 19 Feb 2002 12:37:35 GMT
Client-Response-Num: 1
Set-Cookie:
WebLogicSession=PHJG0oDVfgz68YWMM8DpXAUxFVZ5gugPKyuKQbIf716lkw6bRRBM
|-1484200219301769473/-1628821962/6/7001/7001/7002/7002/7001/-1; path=/
X-Cache: MISS from fcomain

After which a cached version of the content and headers is created in the
cache, but it still contains the Set-Cookie directive which it should not, I
don't think ...

-

3C72473E 3C723FCA 3C724DDA 0001
3C72470D 3C724710 0008
X-URL: http://fcontdevserver1/communities/test.jsp
Connection: close
Host: FCODEVWS2
User-Agent: lwp-request/1.40

HTTP/1.1 200 OK
Server: Netscape-Enterprise/4.1
Date: Tue, 19 Feb 2002 12:38:22 GMT
Content-length: 8
Content-type: text/html
Expires: Tue, 19 Feb 2002 13:06:34 GMT
Last-modified: Tue, 19 Feb 2002 12:06:34 GMT
Cache-control: no-cache=Set-Cookie
Set-cookie:
WebLogicSession=PHJG0oDVfgz68YWMM8DpXAUxFVZ5gugPKyuKQbIf716lkw6bRRBM|-148420
0219301769473/-1628821962/6/7001/7001/7002/7002/7001/-1; path=/



Test 

-

A subsequent request to the proxy gives a hit to the cache which is correct
but it should NOT serve back the Set-Cookie header.

~ GET -edP http://FCODEVWS2/communities/test.jsp;
Cache-Control: no-cache=Set-Cookie
Connection: close
Date: Tue, 19 Feb 2002 12:38:42 GMT
Age: 69
Server: Apache/1.3.23 (Win32)
Content-Length: 8
Content-Type: text/html
Expires: Tue, 19 Feb 2002 13:06:34 GMT
Last-Modified: Tue, 19 Feb 2002 12:06:34 GMT
Client-Date: Tue, 19 Feb 2002 12:38:40 GMT
Client-Response-Num: 1
Set-Cookie:
WebLogicSession=PHJG0oDVfgz68YWMM8DpXAUxFVZ5gugPKyuKQbIf716lkw6bRRBM
|-1484200219301769473/-1628821962/6/7001/7001/7002/7002/7001/-1; path=/
X-Cache: HIT from fcomain

The relevant part of the HTTP spec I think is 

no-cache 
If the no-cache directive does not specify a field-name, then a cache MUST
NOT use the response to satisfy a subsequent request without successful
revalidation with the origin server. This allows an origin server to prevent
caching even by caches that have been configured to return stale responses
to client requests. 
If the no-cache directive does specify one or more field-names, then a cache
MAY use the response to satisfy a subsequent request, subject to any other
restrictions on caching. However, the specified field-name(s) MUST NOT be
sent in the response to a subsequent request without successful revalidation
with the origin server. This allows an origin server to prevent the re-use
of certain header fields in a response, while still allowing caching of the
rest of the response. 

I am missing something?

Cheers,

Brian

-Original Message-
From: Graham Leggett [mailto:[EMAIL PROTECTED]]
Sent: 19 February 2002 11:59
To: [EMAIL PROTECTED]
Subject: Re: mod_proxy Cache-Control: no-cache=directive support
Apache 1.3


Fowler, Brian wrote:

 Due to a requirement on a project we are currently working on
 involving using Apache as a caching reverse proxy server to WebLogic.
 
 We are considering implementing the
 
 Cache-Control: no-cache=directive
 
 for the Apache 1.3 mod_proxy module so allow us to prevent the caching
 of certain headers served by WebLogic. (In particular the session
 cookie.)
 
 Has/is anyone working in this area? Is there any specific reason why
 this has deliberately not been implemented already? (E.g. performance
 hit?) Any views on this directive?

I'm not 100% sure what your question is.

The apache proxy follows RFC2616 when it comes to understanding and
honouring the Cache-Control directive. The responsibility of setting
this header correctly is that of your Weblogic application.

If the application is braindead, you should be able to use the
capability of mod_headers to add the cache-control header within apache
itself. (As I am aware this should work, as long as mod_headers comes
before mod_proxy in your config. In v2.0, this should work automatically
- but test it first).

Regards,
Graham
-- 
-
[EMAIL PROTECTED]There's a moon
over Bourbon Street
tonight...

This e-mail

Re: mod_proxy Cache-Control: no-cache=directive support Apache 1.3

2002-02-19 Thread Graham Leggett

Fowler, Brian wrote:

 I don't think mod_proxy does currently conform to RFC2616 in respect of
 Cache-Control: no-cache=directive

I just checked - a small note in my copy of RFC2616 says not done
yet.. doh...!

 The relevant part of the HTTP spec I think is
 
 no-cache
[snip]
 If the no-cache directive does specify one or more field-names, then a cache
 MAY use the response to satisfy a subsequent request, subject to any other
 restrictions on caching. However, the specified field-name(s) MUST NOT be
 sent in the response to a subsequent request without successful revalidation
 with the origin server. This allows an origin server to prevent the re-use
 of certain header fields in a response, while still allowing caching of the
 rest of the response.

So which of the following two senarios is the correct behavior:

- If the header specified is not in the request, ignore that
Cache-Control header.
- If the header IS specified in the request, behave like Cache-Control:
max-age=0

OR

- If the header specified is not in the request, ignore that
Cache-Control header.
- If the header IS specified in the request, strip that header and
return the request with the header removed.

From the text quoted above, either seem valid, or am I reading it
wrong...?

Regards,
Graham
-- 
-
[EMAIL PROTECTED]There's a moon
over Bourbon Street
tonight...


smime.p7s
Description: S/MIME Cryptographic Signature