Mailing List Archive

apache+zope+varnish
Hi,

My configuration :
I've a apache server with the mod proxy activated listening in the port 80 and redirect to 9080 where my plone site listen.

And i know that varnish is the best solution to cache
How integrated varnish in this achitecture ? (What port must listen varnish in my architecture? How specify to apache to cache with varnish? ...)

I begin to install varnish with the source but i've some problem to understand how implemented all this technologies (i'm french and ...)

Thanks for your answer
(i've read architect note and i'm beginning to read the man and other doc but au user guide will be so useful)
long life to varnish it will be a standard...
apache+zope+varnish [ In reply to ]
On Sep 24, 2007, at 8:57 AM, <Samuel.Martin at ac-nantes.fr> wrote:

> Hi,
>
> My configuration :
> I've a apache server with the mod proxy activated listening in the
> port 80 and redirect to 9080 where my plone site listen.
>
> And i know that varnish is the best solution to cache
> How integrated varnish in this achitecture ? (What port must listen
> varnish in my architecture? How specify to apache to cache with
> varnish? ...)
>
> I begin to install varnish with the source but i've some problem to
> understand how implemented all this technologies (i'm french and ...)
>
> Thanks for your answer
> (i've read architect note and i'm beginning to read the man and
> other doc but au user guide will be so useful)
> long life to varnish it will be a standard...


If you're using Plone, I suggest looking at CacheFu (http://plone.org/
products/cachefu). Even if you're not using Plone, CacheFu generates
some beta Varnish configs that might be useful as a reference.

Another one to look at is plone.recipe.varnish (http://
pypi.python.org/pypi/plone.recipe.varnish), which despite the name is
NOT specific to Plone.

Ric
apache+zope+varnish [ In reply to ]
bonjour,
>>
>>
>> And i know that varnish is the best solution to cache
>> How integrated varnish in this achitecture ? (What port must listen
>> varnish in my architecture? How specify to apache to cache with
>> varnish? ...)
>>
>>
put varnish in front of apache
apache don't have to cache anything just using it to load balance to zeo
client

>> I begin to install varnish with the source but i've some problem to
>> understand how implemented all this technologies (i'm french and ...)
>>
>>
I'm french too.... and working for the the same big entity ( :-D )
...and we use varnish with zope/cps.
I did some slides on varnish and had presented them to other systems
administrators in June. If you want them and our config you can contact me.

Jean-marc Pouchoulon
Rectorat de Montpellier
apache+zope+varnish [ In reply to ]
On Sep 24, 2007, at 12:18 PM, jean-marc pouchoulon wrote:

>
> bonjour,
>>>
>>>
>>> And i know that varnish is the best solution to cache
>>> How integrated varnish in this achitecture ? (What port must listen
>>> varnish in my architecture? How specify to apache to cache with
>>> varnish? ...)
>>>
>>>
> put varnish in front of apache
> apache don't have to cache anything just using it to load balance
> to zeo
> client
>
>>> I begin to install varnish with the source but i've some problem to
>>> understand how implemented all this technologies (i'm french
>>> and ...)
>>>
>>>
> I'm french too.... and working for the the same big entity ( :-D )
> ...and we use varnish with zope/cps.
> I did some slides on varnish and had presented them to other systems
> administrators in June. If you want them and our config you can
> contact me.
>
> Jean-marc Pouchoulon
> Rectorat de Montpellier


Use-cases differ of course, but I'm partial to the other way around.
Put Apache in front of Varnish and Varnish in front of Zope. And if
you need load balancing, insert something like Pound between Varnish
and the Zeo clients (although there is some work in Varnish trunk to
add load balancing). This configuration frees up Apache to serve
other stuff besides the Varnish cached content.

Ric
apache+zope+varnish [ In reply to ]
>
> Use-cases differ of course, but I'm partial to the other way around.
> Put Apache in front of Varnish and Varnish in front of Zope. And if
> you need load balancing, insert something like Pound between Varnish
> and the Zeo clients (although there is some work in Varnish trunk to
> add load balancing). This configuration frees up Apache to serve
> other stuff besides the Varnish cached content.
>
IMHO apache perf cannot rivalize with varnish , that's why I put them
behind varnish. We have differents applications (differents apache) and
varnish regex are sufficient to switch the traffic.
Apache 2.2 (load balancing + mod_rewrite) is used to do load balancing
on ZEO .In our case there are also hardware compression and load
balancing in front of varnish.

but "Use-cases differ of course" and there are many good solutions and
I am not using plone

jean-marc


> Ric
>
>
apache+zope+varnish [ In reply to ]
On Sep 24, 2007, at 11:20 PM, jean-marc pouchoulon wrote:

>> Use-cases differ of course, but I'm partial to the other way
>> around. Put Apache in front of Varnish and Varnish in front of
>> Zope. And if you need load balancing, insert something like Pound
>> between Varnish and the Zeo clients (although there is some work
>> in Varnish trunk to add load balancing). This configuration frees
>> up Apache to serve other stuff besides the Varnish cached content.
>>
> IMHO apache perf cannot rivalize with varnish , that's why I put
> them behind varnish. We have differents applications (differents
> apache) and varnish regex are sufficient to switch the traffic.
> Apache 2.2 (load balancing + mod_rewrite) is used to do load
> balancing on ZEO .In our case there are also hardware compression
> and load balancing in front of varnish.
>
> but "Use-cases differ of course" and there are many good solutions
> and I am not using plone


Note, this configuration has nothing to do with whether one is using
Plone. :-)

Varnish is good as a proxy in front of *slow* backends generating
dynamic content, but I suspect it's probably of marginal benefit as a
proxy to serve static content and possibly even when serving *fast*
dynamic content.

I'm curious about the claim about Apache performance in comparison to
Varnish. Is Varnish serving from cache really that much faster than
Apache serving static files? I suppose an argument can be made that
Apache-in-front-of-Varnish might add an extra delay compared to
Varnish serving from cache directly. I wonder if this delay is
significant. Anyone have any benchmarks?

Ric
apache+zope+varnish [ In reply to ]
Ricardo Newbery <ric at digitalmarbles.com> writes:
> Varnish is good as a proxy in front of *slow* backends generating
> dynamic content, but I suspect it's probably of marginal benefit as
> a proxy to serve static content and possibly even when serving
> *fast* dynamic content.

You're wrong. Varnish improves performance even for static content
and fast dynamic content. Varnish serves requests from memory, and
doesn't spend valuable time writing logs.

> I'm curious about the claim about Apache performance in comparison
> to Varnish. Is Varnish serving from cache really that much faster
> than Apache serving static files?

Yes, as long as your client isn't apachebench.

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no
apache+zope+varnish [ In reply to ]
On Sep 25, 2007, at 1:07 AM, Dag-Erling Sm?rgrav wrote:

> Ricardo Newbery <ric at digitalmarbles.com> writes:
>> Varnish is good as a proxy in front of *slow* backends generating
>> dynamic content, but I suspect it's probably of marginal benefit as
>> a proxy to serve static content and possibly even when serving
>> *fast* dynamic content.
>
> You're wrong. Varnish improves performance even for static content
> and fast dynamic content. Varnish serves requests from memory, and
> doesn't spend valuable time writing logs.


If you don't need logs, it just as easy to turn this off in Apache.



>> I'm curious about the claim about Apache performance in comparison
>> to Varnish. Is Varnish serving from cache really that much faster
>> than Apache serving static files?
>
> Yes, as long as your client isn't apachebench.


I'm sure it's faster, but how much faster? Any benchmarks against a
performance-optimized Apache?

Performance-tweaking is like security-tweaking. At a certain point,
it's just a black hole you can throw more money and effort into and
get marginal returns. And increasing performance (as in increasing
security) often means sacrificing some power or flexibility
elsewhere. For some use-cases, the marginal returns and decreased
flexibility are worth the effort. For many, I suspect it's probably
not. In any case, it's better to make these decisions based on some
objective measurements.

Ric