You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by wo...@yahoo.co.jp on 2004/08/04 21:47:19 UTC

[users@httpd] What's the difference between mod_cache and the reverse proxy ?

Hi all.

As I wrote in the subject, I wanna know the difference between them.

Here is my scenario.
There're a hundreds of servers(Apache + Tomcat) in a load-balanced 
environment, and those servers access to a single database.
Thus, they can serve static files to a bunch of clients at once,
but once many clients send a request which needs a SQL query,it's 
gonna cause a huge performance problem.

That's why I've been searching any ways that minimize the performance problem,
and finally found two choices that are mod_cache or the reverse proxy (mod_proxy?).

By using the mod_cache, I gotta install it to apache on all servers.
On the other hand, using the reverse proxy server, I can just place a couple of 
them in front of the load balancer.

I first thought the formar way is kinda trouble some since I gotta install mod_cache 
in all servers. But now it seems easy to maintainance. The latter way seems hard to 
maintainance.
hm...I still don't know which way is better for performance and maintainance.

can anybody give me a help, a tip or a joke ? oops...i don't need a joke...

Thanks in advance.

wolfgang





---------------------------------------------------------------------
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] What's the difference between mod_cache and the reverse proxy ?

Posted by wo...@yahoo.co.jp.
Hi Jim.
Thank you for replying.

> I dont know the difference between the two, nor do I know if this is what you
> are looking for, but depending on what SQL server you are running (im going to
> assume mysql, but that may end up biting me in the ass) you may be able to run
> multiple database servers as well to reduce the load on them.

Actually, we've got 8 databases and they are clustered. 
Why I didn't talk about it is that I just wanted readers to be concentrated on answering 
the difference between the mod_cache and the reverse proxy.
(I don't need solutions for databases for now.)

anyways, thank you so much, Jim.

wolfgang.



---------------------------------------------------------------------
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] What's the difference between mod_cache and the reverse proxy ?

Posted by Jim Maul <jm...@elih.org>.
Quoting wolfgang127us@yahoo.co.jp:

> Hi all.
>
> As I wrote in the subject, I wanna know the difference between them.
>
> Here is my scenario.
> There're a hundreds of servers(Apache + Tomcat) in a load-balanced
> environment, and those servers access to a single database.
> Thus, they can serve static files to a bunch of clients at once,
> but once many clients send a request which needs a SQL query,it's
> gonna cause a huge performance problem.
>
> That's why I've been searching any ways that minimize the performance 
> problem,
> and finally found two choices that are mod_cache or the reverse proxy 
> (mod_proxy?).
>
> By using the mod_cache, I gotta install it to apache on all servers.
> On the other hand, using the reverse proxy server, I can just place a 
> couple of
> them in front of the load balancer.
>
> I first thought the formar way is kinda trouble some since I gotta 
> install mod_cache
> in all servers. But now it seems easy to maintainance. The latter way 
> seems hard to
> maintainance.
> hm...I still don't know which way is better for performance and maintainance.
>
> can anybody give me a help, a tip or a joke ? oops...i don't need a joke...
>
> Thanks in advance.
>
> wolfgang
>
>

I dont know the difference between the two, nor do I know if this is what you
are looking for, but depending on what SQL server you are running (im going to
assume mysql, but that may end up biting me in the ass) you may be able to run
multiple database servers as well to reduce the load on them.

Jim

---------------------------------------------------------------------
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] What's the difference between mod_cache and the reverse proxy ?

Posted by wo...@yahoo.co.jp.
Thank you, Nick & Joshua.

I thought the reverse proxy implies the cache ability.
That confused me a lot. but now I'm clear cuz of you guys' explanation.
Thank you so mcuh.

wolfgang



---------------------------------------------------------------------
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] What's the difference between mod_cache and the reverse proxy ?

Posted by Nick Kew <ni...@webthing.com>.
On Thu, 5 Aug 2004 wolfgang127us@yahoo.co.jp wrote:

> Thank you for replying, Joshua.
>
> >  since running mod_proxy without mod_cache
> > wouldn't do anything for you.  It would simply pass every request from
> > one host to another.
>
> You mean if I wanna build a REVERSE proxy with apache,
> I have to install both mod_proxy and mod_cache ??

No.  But if you want to lighten the load on your database servers, then
you'll need to cache at the proxy.   Since both mod_proxy and mod_cache
have had some major updates since 2.0.50 was released, you might want to
look at the CVS versions.  But probably not without expert help.

> I thought I could build a reverse proxy with only mod_proxy...

You can.  See http://www.apacheweek.com/features/reverseproxies

-- 
Nick Kew

---------------------------------------------------------------------
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] What's the difference between mod_cache and the reverse proxy ?

Posted by Joshua Slive <js...@gmail.com>.
On Thu, 05 Aug 2004 06:15:50 +0900, wolfgang127us@yahoo.co.jp
<wo...@yahoo.co.jp> wrote:
> Thank you for replying, Joshua.
> 
> >  since running mod_proxy without mod_cache
> > wouldn't do anything for you.  It would simply pass every request from
> > one host to another.
> 
> You mean if I wanna build a REVERSE proxy with apache,
> I have to install both mod_proxy and mod_cache ??
> 
> I thought I could build a reverse proxy with only mod_proxy...

If you want a *caching* reverse proxy, then you need mod_cache.  If
you don't need the caching, then you don't.  (For example, if you are
just running a gateway to bypass a firewall, you may not want to use
mod_cache.)  But it sounds like the main point in your case is the
caching, so you'll certainly want mod_cache.

Joshua.

---------------------------------------------------------------------
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] What's the difference between mod_cache and the reverse proxy ?

Posted by wo...@yahoo.co.jp.
Thank you for replying, Joshua.

>  since running mod_proxy without mod_cache
> wouldn't do anything for you.  It would simply pass every request from
> one host to another.

You mean if I wanna build a REVERSE proxy with apache, 
I have to install both mod_proxy and mod_cache ??  

I thought I could build a reverse proxy with only mod_proxy...


Thank you.

wolfgang


---------------------------------------------------------------------
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] What's the difference between mod_cache and the reverse proxy ?

Posted by Joshua Slive <js...@gmail.com>.
On Thu, 05 Aug 2004 04:47:19 +0900, wolfgang127us@yahoo.co.jp
<wo...@yahoo.co.jp> wrote:
> Hi all.
> 
> As I wrote in the subject, I wanna know the difference between them.

You seem a little confused, since running mod_proxy without mod_cache
wouldn't do anything for you.  It would simply pass every request from
one host to another.

Your true question should be: do you use mod_proxy+mod_cache to
distribute requests to back-end servers, or do you simply use
mod_cache on the backend servers.  This is an architecture question.

Certainly using mod_proxy+mod_cache has some advantages: only a single
copy of the cache is necessary, rather than one per server; you could
possible serve some of the static content locally from the proxy
server and never touch the backend; security rules could be applied
before requests reach the backend servers; etc.  But it also
introduces another point of failure and another level of
content-handling in the chain.

Which will be best for your system depends on many different
complicated factors.  You'd probably need to hire a serious consultant
to get yes/no answer.  On lists like this, you're more likely to get
answers to more specific and concrete questions.

Joshua.

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