www-community mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pier Fumagalli <p...@betaversion.org>
Subject Re: How ASF membership works and what it means
Date Fri, 27 Jun 2003 15:30:45 GMT
"Costin Manolache" <costin@apache.org> wrote:

> On Fri, 27 Jun 2003, Pier Fumagalli wrote:
> 
>> Now, if we put a JVM inside the Apache process scope, we end up with the
>> same problem we had with Apache 1.3, how in the world am I going to be able
>> to share a session between a JVM inside a multithreaded process A and the
>> clone of that same JVM inside another multithreaded process B ????
> 
> The solution is to treat Apache 2.0 processes just like a worker pool,
> and use the load balancing code. Requests without a session will be
> resolved by the in-process VM. Requests with a session will be forwared to
> the right VM if necesary.
> 
> Apache2 will manage the creation of new workers - after all that's the
> benefit of multi-process, multi-thread env. Most of the times you have few
> processes, each with multiple threads, just like the load balanced tomcat
> case.

It is possible, but in practice, highly unreliable and pointless (unless of
course the web applications you're running in your VM are tiny and you don't
have much traffic).

Real case scenario: VNU (my employer). We have a pool of roughly 150.000
articles available on-line at all time, all stored nicely in an Oracle
backend. Of course, fetching an article from the DB backend per every
request is an overkill, especially when we peak up at some hundreds requests
per second, so what we do is that we have a "smallish" cache of the
most-requested articles in the VM ram...

Given our traffic, and number of articles, we're constantly running with 1
Gb of RAM allocated to the VM, and when the VM starts up, it's quite a nice
adventure to fill up that cache with something that will allow us to run
decently and not fall over in 10 seconds... (The initial cache-prefill takes
between 60 and 180 seconds)

We constantly run 2 VMs balanced on 2 different Sun E3500. The Apache front
ends (dealing with all static content and forwarding requests on the
backend) uses the worker MPM with 128 threads and 8 processes per
"instance"...

If for each process I had a VM, I'd end up with at least 8 Gb of allocated
RAM per machine, instead of just one, and I'd have to wait up to three
minutes before starting to process requests by that process, I'd be probably
out-of-job by now...

At the end, I don't know quite what improvement compared to the old
mod_jserv dictated 3 tier processing model.

It _is_ possible, but in the real world, embedding a VM inside Apache is a
twist of all my beliefs (but hey, if you need it, I'm not saying don't do
it, my motto is "live and let die")....

    Pier (think big!)


---------------------------------------------------------------------
To unsubscribe, e-mail: community-unsubscribe@apache.org
For additional commands, e-mail: community-help@apache.org


Mime
View raw message