You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Sam Crawley <mu...@gmail.com> on 2008/02/06 17:03:52 UTC

[users@httpd] Clustered Reverse proxy

Hi,

I'm looking to setup a reverse proxy with Apache 2.2 and mod_cache /
mod_proxy. I need to be able to do the following things:

1. Force an item in the cache to expire now (i.e. the next time someone
accesses it, it will get it from the origin)
2. Force an item in the cache to be refreshed immediately from the origin
3. Ensure requests to the origins are minimised, i.e. if a whole lot of
requests come in for the same item, it won't duplicate those requests to the
origin unneccesarily.
4. Allow querying of different items in the cache for operational purposes
5. Run two separate instances (on different machines) that are consistent,
and things will continue to work more or less should one of them fail

I was just wondering if mod_cache / mod_proxy is suitable for this purpose?
I *think* #1 & #2 will be possible via HTTP cache control headers. I'm not
sure if any support for #3 and #4 is offered. #5 could be achieved through
OS clustering (will be running on Solaris), but would be interested to hear
from anyone who's run this sort of setup before, or any other advice anyone
has to offer?

Thanks in advance,
Sam.

Re: [users@httpd] Clustered Reverse proxy

Posted by Sam Crawley <mu...@gmail.com>.
Thanks for the response.

That's not really going to be an issue in my case, since this cache is
sitting at the back end of the application stack, and actually consists of
small components that are later assembled into a complete page. The outside
world never gets to access the cache directly. I could write an application
to do all this of course, but it seems like most of the functionality is
already there in a reverse proxy.

Sam.

On 07/02/2008, Vincent Bray <no...@gmail.com> wrote:
>
> On 06/02/2008, Sam Crawley <mu...@gmail.com> wrote:
> > I'm looking to setup a reverse proxy with Apache 2.2 and mod_cache /
> > mod_proxy. I need to be able to do the following things:
> >
> > 1. Force an item in the cache to expire now (i.e. the next time someone
> > accesses it, it will get it from the origin)
>
> You're missing the fundamental point of http caching: that resources
> can be cached by any agent on the wider web based on the constraints
> (usually time based) of the original response. Any subsequent requests
> can't affect that, for those proxies. I would guess that you'd be
> better off getting your application to cache its responses to file.
>
> --
> noodl
>
> ---------------------------------------------------------------------
> 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
>
>

Re: [users@httpd] Clustered Reverse proxy

Posted by Vincent Bray <no...@gmail.com>.
On 06/02/2008, Sam Crawley <mu...@gmail.com> wrote:
> I'm looking to setup a reverse proxy with Apache 2.2 and mod_cache /
> mod_proxy. I need to be able to do the following things:
>
> 1. Force an item in the cache to expire now (i.e. the next time someone
> accesses it, it will get it from the origin)

You're missing the fundamental point of http caching: that resources
can be cached by any agent on the wider web based on the constraints
(usually time based) of the original response. Any subsequent requests
can't affect that, for those proxies. I would guess that you'd be
better off getting your application to cache its responses to file.

-- 
noodl

---------------------------------------------------------------------
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