RE: APR & Tomcat...

2010-07-20 Thread Caldarale, Charles R
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Subject: Re: APR & Tomcat...
> 
> > Was that vs BIO or NIO?  As I recall, there is no sendFile 
> > capability in BIO, so both NIO and APR should beat that.
> 
> BIO = JIO, right? Too many TLAs.

The Tomcat doc refers to the original  implementation as BIO, not 
JIO.  Using JIO is ambiguous, since both BIO and JIO are pure Java.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


Re: APR & Tomcat...

2010-07-20 Thread Tony Anecito
Do not worry my friends did not believe me till I sent the before/after logs 
even then they argued about physics and the speed of light :-) Where is 
Einstein 
when you need him?

-Tony



- Original Message 
From: Christopher Schultz 
To: Tomcat Users List 
Sent: Tue, July 20, 2010 11:53:40 AM
Subject: Re: APR & Tomcat...

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tony,

On 7/20/2010 12:35 AM, Tony Anecito wrote:
> Interesting. I saw that when a static file was around 21K or below a dramatic 
> improvement in recorded time in the log for APR. I have not tried with 
> regular 

> Apache Web Server to see what I get.

I should get off my ass and publish my benchmarking results. These
Tomcat knuckleheads keep releasing new versions, and I feel like I
should repeat my tests with the latest version. :(

Soon. Maybe.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxF4qQACgkQ9CaO5/Lv0PCaEgCfePU71YPyDFCPi8dhXyQa+WWZ
haIAn3x04yVH94WKjRyRvaAlFis3C+QV
=E0HG
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


  

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: APR & Tomcat...

2010-07-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tony,

On 7/20/2010 12:35 AM, Tony Anecito wrote:
> Interesting. I saw that when a static file was around 21K or below a dramatic 
> improvement in recorded time in the log for APR. I have not tried with 
> regular 
> Apache Web Server to see what I get.

I should get off my ass and publish my benchmarking results. These
Tomcat knuckleheads keep releasing new versions, and I feel like I
should repeat my tests with the latest version. :(

Soon. Maybe.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxF4qQACgkQ9CaO5/Lv0PCaEgCfePU71YPyDFCPi8dhXyQa+WWZ
haIAn3x04yVH94WKjRyRvaAlFis3C+QV
=E0HG
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: APR & Tomcat...

2010-07-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 7/19/2010 11:50 PM, Caldarale, Charles R wrote:
>> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
>> Subject: Re: APR & Tomcat...
>>
>> My tests show that use of sendFile is dramatically faster 
>> than without.
> 
> Was that vs BIO or NIO?  As I recall, there is no sendFile capability in BIO, 
> so both NIO and APR should beat that.

BIO = JIO, right? Too many TLAs.

The NIO and APR connectors support sendFile, but the blocking, vanilla
Java connector does not. sendFile, in both the NIO and APR connectors,
gives a significant performance improvement. So, you're right, it's not
APR's magic, but the magic of sendFile in either case.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxF4mYACgkQ9CaO5/Lv0PDnAQCggQqYH8rZ4MgWs96fAaoI0KXW
NPsAoLkQepKjXBNJ4RdzYnGjt5m8Eh/j
=rEM7
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: APR & Tomcat...

2010-07-20 Thread Tony Anecito
The red x is the standard way in an html page to indicate something is wrong 
but 
no 404 or other status code is displayed otherwise I would have mentioned it.
Simple google indicated many reasons why it might occur.

As I mentioned in another email I plan to switch back to Apache Web Server and 
there recently has been very good explantions on this email group why to do so. 
As I mentioned I used APR for performance which it did a good job for me but 
other considerations come into play at this point so no need to drag up old 
emails from the Apache group regarding APR.

Regards,
-Tony



- Original Message 
From: Pid 
To: Tomcat Users List 
Sent: Tue, July 20, 2010 10:11:39 AM
Subject: Re: APR & Tomcat...

On 19/07/2010 22:21, Tony Anecito wrote:
> Hi Pid
> 
> First off I get a little red x in the upper left hand corner of the web page.

Excellent technical description of the problem.  Is it the response
status 404 or a 500, I wonder?


> Yep I agree maybe an upgrade to the latest Tomcat and APR might accomplish 
> fixing the problem but silly me I like to understand an issue before I 
upgrade.

I didn't say it would, but silly me I like to advise people to stay
current, to gain the benefit of bug and security fixes.


> APR==httpd at least that is what the Apache Web site says and the acronym I 
> put 
>
> up on the title page is about. The Apache Web server group disavow any 
>knowledge 
>
> of APR since they say the Tomcat Group developed to to replace Apache Web 
> Server.

It's been explained elsewhere in the thread that this is incorrect, but
I'm curious to know where you read that the HTTPD 'group' disavowed APR?


> What little info I could find seems to indicate APR uses the ROOT directory  
> under Webapps for html based apps.
> 
> I will probably go back to Apache Web server as a separate tier. I was trying 
>to 
>
> get better performance using APR + Tomcat and saw some but not enough to 
>justify 
>
> the advantages of a seperate tier.


I can't seem to see whether your original problem has actually been
resolved or not, did you manage to determine what was happening or not?


p


> Best Regards,
> -Tony
> 
> 
> 
> ----- Original Message 
> From: Pid 
> To: Tomcat Users List 
> Sent: Mon, July 19, 2010 3:05:41 PM
> Subject: Re: APR & Tomcat...
> 
> On 19/07/2010 19:44, Tony Anecito wrote:
>> Hi All,
>>
>> I have been having odd issues with APR & Tomcat (6.0.20) since I set it up a 
>> while ago. I am seeing:
> 
> Time for an upgrade.
> 
>> 1. Sometimes on the first try to get images from a page where the images are 
>> assigned a sub domain via a host tag I get a red x. Hitting refresh seems to 
>> retrieve the images. The images are in a subfolder off of the ROOT folder of 
>> tomcat.
> 
> Can you reproduce the problem?
> 
> What does the client actually see?
> 
> You can use a browser tool to find out, e.g. Firebug in Firefox.
> Fiddler, ieHttpHeaders in IE, the built-in developer tools in Safari/Chrome.
> 
> What does the server actually send?  You didn't state your OS (tsk) but
> there are tools available for most OS which will allow you to monitor
> network traffic at the server. (e.g. Wireshark).
> 
>> 2. I get a file not found off of another folder where the file is a jnlp 
file.
>>
>>
>> So is there any type of directory tag (allow, deny ect) I should be using 
>> for 

>> the sub folders off or ROOT? When I used Apache Web server I set those up 
>> but 

>> then I was not using a Host tag either. But for APR I did not set up any 
>> type 

>> directory tags.
> 
> No there isn't.  Tomcat != Apache HTTPD.
> 
> Security permissions are set in the "ROOT/WEB-INF/web.xml", as per the
> Servlet Spec.
> 
> 
> p
> 
>> If I need the directory tags where would I put them?
>>
>> Thanks,
>> -Tony
>>
>>
>>      
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
> 
> 
>      




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: APR & Tomcat...

2010-07-20 Thread Pid
On 19/07/2010 22:21, Tony Anecito wrote:
> Hi Pid
> 
> First off I get a little red x in the upper left hand corner of the web page.

Excellent technical description of the problem.  Is it the response
status 404 or a 500, I wonder?


> Yep I agree maybe an upgrade to the latest Tomcat and APR might accomplish 
> fixing the problem but silly me I like to understand an issue before I 
> upgrade.

I didn't say it would, but silly me I like to advise people to stay
current, to gain the benefit of bug and security fixes.


> APR==httpd at least that is what the Apache Web site says and the acronym I 
> put 
> up on the title page is about. The Apache Web server group disavow any 
> knowledge 
> of APR since they say the Tomcat Group developed to to replace Apache Web 
> Server.

It's been explained elsewhere in the thread that this is incorrect, but
I'm curious to know where you read that the HTTPD 'group' disavowed APR?


> What little info I could find seems to indicate APR uses the ROOT directory  
> under Webapps for html based apps.
> 
> I will probably go back to Apache Web server as a separate tier. I was trying 
> to 
> get better performance using APR + Tomcat and saw some but not enough to 
> justify 
> the advantages of a seperate tier.


I can't seem to see whether your original problem has actually been
resolved or not, did you manage to determine what was happening or not?


p


> Best Regards,
> -Tony
> 
> 
> 
> - Original Message 
> From: Pid 
> To: Tomcat Users List 
> Sent: Mon, July 19, 2010 3:05:41 PM
> Subject: Re: APR & Tomcat...
> 
> On 19/07/2010 19:44, Tony Anecito wrote:
>> Hi All,
>>
>> I have been having odd issues with APR & Tomcat (6.0.20) since I set it up a 
>> while ago. I am seeing:
> 
> Time for an upgrade.
> 
>> 1. Sometimes on the first try to get images from a page where the images are 
>> assigned a sub domain via a host tag I get a red x. Hitting refresh seems to 
>> retrieve the images. The images are in a subfolder off of the ROOT folder of 
>> tomcat.
> 
> Can you reproduce the problem?
> 
> What does the client actually see?
> 
> You can use a browser tool to find out, e.g. Firebug in Firefox.
> Fiddler, ieHttpHeaders in IE, the built-in developer tools in Safari/Chrome.
> 
> What does the server actually send?  You didn't state your OS (tsk) but
> there are tools available for most OS which will allow you to monitor
> network traffic at the server. (e.g. Wireshark).
> 
>> 2. I get a file not found off of another folder where the file is a jnlp 
>> file.
>>
>>
>> So is there any type of directory tag (allow, deny ect) I should be using 
>> for 
>> the sub folders off or ROOT? When I used Apache Web server I set those up 
>> but 
>> then I was not using a Host tag either. But for APR I did not set up any 
>> type 
>> directory tags.
> 
> No there isn't.  Tomcat != Apache HTTPD.
> 
> Security permissions are set in the "ROOT/WEB-INF/web.xml", as per the
> Servlet Spec.
> 
> 
> p
> 
>> If I need the directory tags where would I put them?
>>
>> Thanks,
>> -Tony
>>
>>
>>   
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
> 
> 
>   




signature.asc
Description: OpenPGP digital signature


Re: APR & Tomcat...

2010-07-20 Thread André Warnier

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dale,

On 7/19/2010 7:42 PM, Dale Ogilvie wrote:

Reasons to use httpd being what?


Here are a few ideas:

1. Load balancing
2. Use of mixed Java and non-Java webapps (PHP, Perl, etc.)
3. Use of multiple Tomcat instances behind a single web server

If I thought about it, I could come up with a few more.


4. Imperative/beneficial use of one of the multiple Apache built-in or add-on modules 
which exist for Apache, and where comparable ready-made Tomcat valves, filters, 
applications do not (yet) exist or are not as mature.

(ref : http://httpd.apache.org/docs/2.2/mod/)

5. Situations where running java webapps under a servlet engine is not the main 
focus/purpose/interest of a website, but things like 2. above are.
I'll enclose in that the situations where the main area of competence of the people 
developing or managing the website is not Java.


To round this off, I'd say that the "right" tool for a job does not depend only on the 
intrinsic qualities of the tool itself.  It also depends on many other local 
circumstances, of which the availability of people with the appropriate competences is 
probably the most important.
From a relative outsider's point of view, I would compare Apache httpd and Tomcat as 
follows :


To achieve anything other than relatively trivial with Tomcat, at some point you'll need 
to become very competent with Java. Being competent with Java is a lifetime occupation, 
not because of the language itself, but because achieving anything worthwhile with it 
requires learning about many, many class libraries and their API's.

(Anyone challenging the above ?)

In comparison Apache httpd has, built-in, many features that just require configuration, 
and already has many ready-to-use add-on modules which just require to be plugged-in and 
configured, without having to do any programming at all.

This may suit "sysadmins types" better than "developer types".

In both cases, some knowledge of the HTTP protocol is a must, and a good knowledge of HTTP 
is a tremendous help.
To achieve a certain goal, if you have a choice, choose whatever you are more comfortable 
with.


Technically, I think that Christopher's earlier benchmarks showed that Tomcat can serve 
simple static content at least as well as Apache httpd.
Using Apache httpd as a front-end to Tomcat introduces some overhead, but with a correct 
configuration this overhead will be insignificant in most real-world situations, compared 
to what can be achieved (in terms of unnecessary overhead) by bad coding in the 
applications themselves, whether they are running under Tomcat or under Apache.
To connect Apache with Tomcat, you can use either mod_jk or mod_proxy_ajp (or just 
mod_proxy_http).  Again, each one has its advantages and inconvenients, and you should 
mainly choose whichever you feel more comfortable with.  The difference in performance 
between these solutions will likely be insignificant, compared to the mistakes in 
configuration and in the applications.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: APR & Tomcat...

2010-07-19 Thread Tony Anecito
Interesting. I saw that when a static file was around 21K or below a dramatic 
improvement in recorded time in the log for APR. I have not tried with regular 
Apache Web Server to see what I get.

Regards,
-Tony



- Original Message 
From: "Caldarale, Charles R" 
To: Tomcat Users List 
Sent: Mon, July 19, 2010 9:50:59 PM
Subject: RE: APR & Tomcat...

> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Subject: Re: APR & Tomcat...
> 
> My tests show that use of sendFile is dramatically faster 
> than without.

Was that vs BIO or NIO?  As I recall, there is no sendFile capability in BIO, 
so 
both NIO and APR should beat that.

- Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: APR & Tomcat...

2010-07-19 Thread Caldarale, Charles R
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Subject: Re: APR & Tomcat...
> 
> My tests show that use of sendFile is dramatically faster 
> than without.

Was that vs BIO or NIO?  As I recall, there is no sendFile capability in BIO, 
so both NIO and APR should beat that.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.



Re: APR & Tomcat...

2010-07-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dale,

On 7/19/2010 7:42 PM, Dale Ogilvie wrote:
> Reasons to use httpd being what?

Here are a few ideas:

1. Load balancing
2. Use of mixed Java and non-Java webapps (PHP, Perl, etc.)
3. Use of multiple Tomcat instances behind a single web server

If I thought about it, I could come up with a few more.

> We historically have used httpd and
> mod_proxy_ajp, but less being more I'm considering a tomcat only setup. 

Tomcat-only is a great setup when you have a non-complicated
environment. If you can do it, I'd say "go for it". Fewer attack
vectors, fewer packages to keep up-to-date, etc. Just remember to use
APR+sendFile ;) Or even NIO+sendFile.

> The reason we used httpd in the past was "httpd serves static content
> better".

That reason is no longer valid with a proper configuration.

> One other reason that comes to mind is httpd url rewrite support,
> assuming tomcat can't help in this area. Any others?

tuckey's urlrewrite, though mod_rewrite is much more chainsawy than
urlrewrite.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxFGwIACgkQ9CaO5/Lv0PAtCgCfQhy1SRwitWFe/YIcPYLLhp/G
l3EAn1Xl0vj98K8+uLCR/XBN5W5fGs7Q
=+w6j
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: APR & Tomcat...

2010-07-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 7/19/2010 9:57 PM, Caldarale, Charles R wrote:
>> From: Tony Anecito [mailto:adanec...@yahoo.com]
>> Subject: Re: APR & Tomcat...
>>
>> So as to say the Tomcat group did not want to compete 
>> why build the APR?
> 
> Tomcat people did not create it - APR has been around for years.
> It's part of many products (e.g., subversion).
> 
> What the Tomcat group did was provide a JNI interface to APR to allow
> its use with Tomcat directly, primarily because OpenSSL is much
> faster than the pure Java SSE equivalent.  APR provides no
> significant benefits for unencrypted content.

My tests show that use of sendFile is dramatically faster than without.
I did not benchmark SSL.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxFGgYACgkQ9CaO5/Lv0PCMCQCgt4f7Banncs4EqYkSE23Uk7CA
k58An1LIVEB4vtipQpkLdkvIfjuzi50y
=1ya/
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: APR & Tomcat...

2010-07-19 Thread Caldarale, Charles R
> From: Tony Anecito [mailto:adanec...@yahoo.com]
> Subject: Re: APR & Tomcat...
> 
> The disadvantages are such as when Tomcat is taken down 
> so does your static content.

So why are you taking Tomcat down?  "Doctor, doctor, it hurts when I do this!"

> I am guessing better security for Apache Web Server 
> versus APR

You're right - you're guessing.  There's no evidence to support that conjecture.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: APR & Tomcat...

2010-07-19 Thread Caldarale, Charles R
> From: Dale Ogilvie [mailto:dale.ogil...@trimble.co.nz]
> Subject: RE: APR & Tomcat...
> 
> Reasons to use httpd being what?

Serving PHP and as a poor man's load balancer, for starters.

> The reason we used httpd in the past was "httpd serves 
> static content better".

Which hasn't been true for some years.

> One other reason that comes to mind is httpd url rewrite support,

The equivalent for Tomcat is here:
http://www.tuckey.org/urlrewrite/

> /still hoping my tomcat download license doesn't get 
> revoked before tomcat 7 is released/

Too late: Tomcat 7 has been released - albeit still beta.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: APR & Tomcat...

2010-07-19 Thread Caldarale, Charles R
> From: Tony Anecito [mailto:adanec...@yahoo.com]
> Subject: Re: APR & Tomcat...
> 
> So as to say the Tomcat group did not want to compete 
> why build the APR?

Tomcat people did not create it - APR has been around for years.  It's part of 
many products (e.g., subversion).

What the Tomcat group did was provide a JNI interface to APR to allow its use 
with Tomcat directly, primarily because OpenSSL is much faster than the pure 
Java SSE equivalent.  APR provides no significant benefits for unencrypted 
content.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: APR & Tomcat...

2010-07-19 Thread Richard Maynard
Next experiment can be Varnish in front of Tomcat with APR :) 

I'm having a lot of fun with it with mostly stateless apps and to optimize some 
test projects, but haven't had an opportunity to deploy it in any large 
configuration. It provides a lot of great features and can really be used to 
tune the heck out of static and semi-static content!

--
Richard Maynard

-Original Message-
From: Tony Anecito [mailto:adanec...@yahoo.com] 
Sent: Monday, July 19, 2010 7:42 PM
To: Tomcat Users List
Subject: Re: APR & Tomcat...

I used APR for performance reasons. I was running Apache Web Server and Tomcat 
on the same physical windows server. I mentioned what configuration might be 
faster and was told APR native with Tomcat and it was faster. I might have gone 
from 1.5 to 1.0 milliseconds for JAXWS requests.

The disadvantages are such as when Tomcat is taken down so does your static 
content. Apache Web Server is probably updated more frequently than APR Native. 
I am guessing better security for Apache Web Server versus APR and probably 
more 
that the Tomcat and Apache Web Server teams can agree upon such as load 
balancing.

So APR Native was an experiment for me not a final solution. Time to go back to 
reality.

Thanks,
-Tony



- Original Message 
From: Dale Ogilvie 
To: Tomcat Users List 
Sent: Mon, July 19, 2010 5:42:39 PM
Subject: RE: APR & Tomcat...


Reasons to use httpd being what? We historically have used httpd and
mod_proxy_ajp, but less being more I'm considering a tomcat only setup. 

The reason we used httpd in the past was "httpd serves static content
better".

One other reason that comes to mind is httpd url rewrite support,
assuming tomcat can't help in this area. Any others?

Dale

/still hoping my tomcat download license doesn't get revoked before
tomcat 7 is released/

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Tuesday, 20 July 2010 9:51 a.m.
To: Tomcat Users List
Subject: Re: APR & Tomcat...

There certainly are reasons to use Apache httpd out in front of Tomcat,
but performance isn't one of them.

- -chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


  

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Confidentiality Notice: This e-mail message (including any attached or
embedded documents) is intended for the exclusive and confidential use of the
individual or entity to which this message is addressed, and unless otherwise
expressly indicated, is confidential and privileged information of Rackspace.
Any dissemination, distribution or copying of the enclosed material is 
prohibited.
If you receive this transmission in error, please notify us immediately by 
e-mail
at ab...@rackspace.com, and delete the original message.
Your cooperation is appreciated.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: APR & Tomcat...

2010-07-19 Thread Tony Anecito
I used APR for performance reasons. I was running Apache Web Server and Tomcat 
on the same physical windows server. I mentioned what configuration might be 
faster and was told APR native with Tomcat and it was faster. I might have gone 
from 1.5 to 1.0 milliseconds for JAXWS requests.

The disadvantages are such as when Tomcat is taken down so does your static 
content. Apache Web Server is probably updated more frequently than APR Native. 
I am guessing better security for Apache Web Server versus APR and probably 
more 
that the Tomcat and Apache Web Server teams can agree upon such as load 
balancing.

So APR Native was an experiment for me not a final solution. Time to go back to 
reality.

Thanks,
-Tony



- Original Message 
From: Dale Ogilvie 
To: Tomcat Users List 
Sent: Mon, July 19, 2010 5:42:39 PM
Subject: RE: APR & Tomcat...


Reasons to use httpd being what? We historically have used httpd and
mod_proxy_ajp, but less being more I'm considering a tomcat only setup. 

The reason we used httpd in the past was "httpd serves static content
better".

One other reason that comes to mind is httpd url rewrite support,
assuming tomcat can't help in this area. Any others?

Dale

/still hoping my tomcat download license doesn't get revoked before
tomcat 7 is released/

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Tuesday, 20 July 2010 9:51 a.m.
To: Tomcat Users List
Subject: Re: APR & Tomcat...

There certainly are reasons to use Apache httpd out in front of Tomcat,
but performance isn't one of them.

- -chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


  

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: APR & Tomcat...

2010-07-19 Thread Dale Ogilvie
 
Reasons to use httpd being what? We historically have used httpd and
mod_proxy_ajp, but less being more I'm considering a tomcat only setup. 

The reason we used httpd in the past was "httpd serves static content
better".

One other reason that comes to mind is httpd url rewrite support,
assuming tomcat can't help in this area. Any others?

Dale

/still hoping my tomcat download license doesn't get revoked before
tomcat 7 is released/

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Tuesday, 20 July 2010 9:51 a.m.
To: Tomcat Users List
Subject: Re: APR & Tomcat...

There certainly are reasons to use Apache httpd out in front of Tomcat,
but performance isn't one of them.

- -chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: APR & Tomcat...

2010-07-19 Thread Tony Anecito
For each image I would get a small red x. When I hit refresh and it then 
display 
them.

Comments like this on Confluence web site for example explain:

After a bit of Googling came across this:
"Apache Portable Runtime to provide superior scalability, performance" for 
Tomcat 6.
There are comments that when using the APR Tomcat will server static content on 
par with Apache (httpd) server speeds - though I haven't been able to 
personally 
verify this just yet.
 
Or from the Tomcat site itself http://tomcat.apache.org/tomcat-5.5-doc/apr.html:
 
Tomcat can use the Apache Portable Runtime to provide superior scalability, 
performance, and better integration with native server technologies. The Apache 
Portable Runtime is a highly portable library that is at the heart of Apache 
HTTP Server 2.x. APR has many uses, including access to advanced IO 
functionality (such as sendfile, epoll and OpenSSL), OS level functionality 
(random number generation, system status, etc), and native process handling 
(shared memory, NT pipes and Unix sockets). 

>These features allows making Tomcat a general purpose webserver, will enable 
>much better integration with other native web technologies, and overall make 
>Java much more viable as a full fledged webserver platform rather than simply 
>a 
>backend focused technology. 
>
So as to say the Tomcat group did not want to compete why build the APR?

In either case it does not matter for me but I do appreciate the feedback.

Regards,
-Tony


- Original Message 
From: Christopher Schultz 
To: Tomcat Users List 
Sent: Mon, July 19, 2010 3:51:28 PM
Subject: Re: APR & Tomcat...

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tony,

On 7/19/2010 5:21 PM, Tony Anecito wrote:
> First off I get a little red x in the upper left hand corner of the web page.

For the whole page? I thought this was an image problem.

> Yep I agree maybe an upgrade to the latest Tomcat and APR might accomplish 
> fixing the problem but silly me I like to understand an issue before I 
upgrade.

Upgrading is a good idea, but is unlikely to magically fix everything.
I'm unaware of any huge bugs in Tomcat 6.0.20 like "web server doesn't
work at all".

> APR==httpd at least that is what the Apache Web site says and the acronym I 
> put 
>
> up on the title page is about. The Apache Web server group disavow any 
>knowledge 
>
> of APR since they say the Tomcat Group developed to to replace Apache Web 
> Server.

APR != httpd

The "Tomcat Group" neither developed APR nor did they do it to undercut
anything the httpd group is doing. On the contrary, libapr is a project
to help many other projects, including httpd itself.

http://apr.apache.org/
http://apr.apache.org/projects.html
http://en.wikipedia.org/wiki/Apache_Portable_Runtime

> What little info I could find seems to indicate APR uses the ROOT directory  
> under Webapps for html based apps.

APR does nothing of the sort. APR essentially provides two major
capabilities to Tomcat:

1. SSL services using OpenSSL library instead of Java-based SSL
2. "Sendfile" services to serve static content directly from
disk-to-socket with minimal overhead

Both of these features are configured on a  in Tomcat and
will work with any webapp deployed into the container. It has nothing to
do with ROOT or any other specific webapp.

> I will probably go back to Apache Web server as a separate tier. I was trying 
>to 
>
> get better performance using APR + Tomcat and saw some but not enough to 
>justify 
>
> the advantages of a seperate tier.

Apache httpd + Tomcat will always be slower than simply using Tomcat +
APR/sendfile because of the overhead involved in forwarding the requests
back and forth. The only exception might be a site which is almost
exclusively static content and only one or two dynamic resources. In
that case, I might ask why that person was using Java in the first place ;)

There certainly are reasons to use Apache httpd out in front of Tomcat,
but performance isn't one of them.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxEyOAACgkQ9CaO5/Lv0PD+ngCdGoi80vMKrjB7UMP9kQKyLaS3
X/UAnjslqqAnc7796Xr14ic5cDEckPYl
=vtNH
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: APR & Tomcat...

2010-07-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tony,

On 7/19/2010 5:21 PM, Tony Anecito wrote:
> First off I get a little red x in the upper left hand corner of the web page.

For the whole page? I thought this was an image problem.

> Yep I agree maybe an upgrade to the latest Tomcat and APR might accomplish 
> fixing the problem but silly me I like to understand an issue before I 
> upgrade.

Upgrading is a good idea, but is unlikely to magically fix everything.
I'm unaware of any huge bugs in Tomcat 6.0.20 like "web server doesn't
work at all".

> APR==httpd at least that is what the Apache Web site says and the acronym I 
> put 
> up on the title page is about. The Apache Web server group disavow any 
> knowledge 
> of APR since they say the Tomcat Group developed to to replace Apache Web 
> Server.

APR != httpd

The "Tomcat Group" neither developed APR nor did they do it to undercut
anything the httpd group is doing. On the contrary, libapr is a project
to help many other projects, including httpd itself.

http://apr.apache.org/
http://apr.apache.org/projects.html
http://en.wikipedia.org/wiki/Apache_Portable_Runtime

> What little info I could find seems to indicate APR uses the ROOT directory  
> under Webapps for html based apps.

APR does nothing of the sort. APR essentially provides two major
capabilities to Tomcat:

1. SSL services using OpenSSL library instead of Java-based SSL
2. "Sendfile" services to serve static content directly from
disk-to-socket with minimal overhead

Both of these features are configured on a  in Tomcat and
will work with any webapp deployed into the container. It has nothing to
do with ROOT or any other specific webapp.

> I will probably go back to Apache Web server as a separate tier. I was trying 
> to 
> get better performance using APR + Tomcat and saw some but not enough to 
> justify 
> the advantages of a seperate tier.

Apache httpd + Tomcat will always be slower than simply using Tomcat +
APR/sendfile because of the overhead involved in forwarding the requests
back and forth. The only exception might be a site which is almost
exclusively static content and only one or two dynamic resources. In
that case, I might ask why that person was using Java in the first place ;)

There certainly are reasons to use Apache httpd out in front of Tomcat,
but performance isn't one of them.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxEyOAACgkQ9CaO5/Lv0PD+ngCdGoi80vMKrjB7UMP9kQKyLaS3
X/UAnjslqqAnc7796Xr14ic5cDEckPYl
=vtNH
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: APR & Tomcat...

2010-07-19 Thread Tony Anecito
Hi Pid

First off I get a little red x in the upper left hand corner of the web page.

Yep I agree maybe an upgrade to the latest Tomcat and APR might accomplish 
fixing the problem but silly me I like to understand an issue before I upgrade.

APR==httpd at least that is what the Apache Web site says and the acronym I put 
up on the title page is about. The Apache Web server group disavow any 
knowledge 
of APR since they say the Tomcat Group developed to to replace Apache Web 
Server.

What little info I could find seems to indicate APR uses the ROOT directory  
under Webapps for html based apps.

I will probably go back to Apache Web server as a separate tier. I was trying 
to 
get better performance using APR + Tomcat and saw some but not enough to 
justify 
the advantages of a seperate tier.

Best Regards,
-Tony



- Original Message 
From: Pid 
To: Tomcat Users List 
Sent: Mon, July 19, 2010 3:05:41 PM
Subject: Re: APR & Tomcat...

On 19/07/2010 19:44, Tony Anecito wrote:
> Hi All,
> 
> I have been having odd issues with APR & Tomcat (6.0.20) since I set it up a 
> while ago. I am seeing:

Time for an upgrade.

> 1. Sometimes on the first try to get images from a page where the images are 
> assigned a sub domain via a host tag I get a red x. Hitting refresh seems to 
> retrieve the images. The images are in a subfolder off of the ROOT folder of 
> tomcat.

Can you reproduce the problem?

What does the client actually see?

You can use a browser tool to find out, e.g. Firebug in Firefox.
Fiddler, ieHttpHeaders in IE, the built-in developer tools in Safari/Chrome.

What does the server actually send?  You didn't state your OS (tsk) but
there are tools available for most OS which will allow you to monitor
network traffic at the server. (e.g. Wireshark).

> 2. I get a file not found off of another folder where the file is a jnlp file.
> 
> 
> So is there any type of directory tag (allow, deny ect) I should be using for 
> the sub folders off or ROOT? When I used Apache Web server I set those up but 
> then I was not using a Host tag either. But for APR I did not set up any type 
> directory tags.

No there isn't.  Tomcat != Apache HTTPD.

Security permissions are set in the "ROOT/WEB-INF/web.xml", as per the
Servlet Spec.


p

> If I need the directory tags where would I put them?
> 
> Thanks,
> -Tony
> 
> 
>      
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: APR & Tomcat...

2010-07-19 Thread Pid
On 19/07/2010 19:44, Tony Anecito wrote:
> Hi All,
> 
> I have been having odd issues with APR & Tomcat (6.0.20) since I set it up a 
> while ago. I am seeing:

Time for an upgrade.

> 1. Sometimes on the first try to get images from a page where the images are 
> assigned a sub domain via a host tag I get a red x. Hitting refresh seems to 
> retrieve the images. The images are in a subfolder off of the ROOT folder of 
> tomcat.

Can you reproduce the problem?

What does the client actually see?

You can use a browser tool to find out, e.g. Firebug in Firefox.
Fiddler, ieHttpHeaders in IE, the built-in developer tools in Safari/Chrome.

What does the server actually send?  You didn't state your OS (tsk) but
there are tools available for most OS which will allow you to monitor
network traffic at the server. (e.g. Wireshark).

> 2. I get a file not found off of another folder where the file is a jnlp file.
> 
> 
> So is there any type of directory tag (allow, deny ect) I should be using for 
> the sub folders off or ROOT? When I used Apache Web server I set those up but 
> then I was not using a Host tag either. But for APR I did not set up any type 
> directory tags.

No there isn't.  Tomcat != Apache HTTPD.

Security permissions are set in the "ROOT/WEB-INF/web.xml", as per the
Servlet Spec.


p

> If I need the directory tags where would I put them?
> 
> Thanks,
> -Tony
> 
> 
>   
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 




signature.asc
Description: OpenPGP digital signature