tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Tomcat Repsonse question...
Date Thu, 08 Oct 2009 04:05:48 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tony,

On 10/7/2009 8:16 PM, Tony Anecito wrote:
> I am using Apache Web server for the front end to serve my html
> requests.

Why? Tomcat can serve those requests quite well.

> I have thought about using JBoss with it's Tomcat as the
> front end Apache as the back end for handling ordinary http requests
> but have not found anyone who has done that.

That's because it would be silly to do that. Just use tcnative with
"sendFile" enabled on your HTTP Connector: it's the same as
"back-ending" (whatever that means) Tomcat with Apache httpd.

> This is so I use the
> standard port 80 for requests over the internet.

Tomcat can use port 80 just fine.

http://wiki.apache.org/tomcat/HowTo#How_to_run_Tomcat_without_root_priviledges.3F

(Please ignore the misspelling of "privileges")

> Web start does do keep-alive requests I believe so maybe that is
> something to consider.

Why would Java WebStart send keep-alive requests? Doesn't it just
download a Java application and run it on the client side? Continued
communication with the server just seems ... completely unnecessary.

> My goal is to see if I can get response times over the lan under
> 1msec using standard cheap hardware and open source software.

How fast is your LAN? Using standard ping over a 802.11g network, I get
response times around 3/4ms, and that's just to the TCP/IP stack and
back. You are talking about adding HTTP protocol decoding, request
delegation, and your webapp's code in under 1/4ms? That seems like a
stretch unless your web application is pretty much doing nothing.

> I am
> close to my 1msec goal (measured at the client) and know if I upgrade
> my old AMD64 5200+ I use for my server to say a Phenom II quad say a
> 955 I might be able to pull it off.

Ha ha ha. Yes, buying more hardware will (usually) improve your
performance, but I suspect the network is the largest contributor to
your observed latency, and you can only get Ethernet to go so fast.

> Client PC: 4-5msec measured after message received from JAX-WS proxy
> in code.

Ha! You're running an XML web service on top of all this? If you are
worried about performance, why did you bother with web services at all? ;)

> Apache: logs 0 microsecond (running on windows so suspect 15msec
> accuracy from timers even though microsecond resolution expected in
> Apache logs)

win32 timers are horrible: I wouldn't trust them to more than 1/2sec
accuracy.

> Tomcat: 20 microseconds response time measured at web service method
> called by client. I am using cache at this tier.

Again, if measuring on win32, you may be looking at timing lies.

> For those results client/Apache/Tomcat(Jboss) are on same physical
> PC. If I try from another client on lan I get the same response time
> at the client. Thus routers/switches (1Gbps) are not noticable from
> response time perspective right now.

I disagree: if you are saying that localhost is as fast as a gigabit
network, then the numbers you are seeing simply can't be right,
especially when you're talking about the millisecond and microsecond level.

I don't think we can really help you, other than to suggest that you
switch to UDP, write your code in C, only use 32-bit little-endian data
types, and use a binary protocol that amounts to memory dumping data
using C data structures.

XML web services... ha ha ha.

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

iEYEARECAAYFAkrNZRwACgkQ9CaO5/Lv0PAWiwCgw5ZGcg/FIR57mlMffy/We7hD
/10AniPV+ZQkILGKkQdVZRKv/p1lrEb/
=IABV
-----END PGP SIGNATURE-----

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


Mime
View raw message