Hi,
On Sat, 5 May 2001, Xilei Wang wrote:
> 1. I know ajp protocol was originally introduced by
> by mod_jserv to communicate with JServ. But what I
> was wondering is, why at that time, a new protocol,
> ajpxx was introduced rather using the existing http
> protocol.
It is felt that a binary protocol is more efficient -
I know the theory that text based protocol can be
very efficient ( see the recent SOAP developments ),
and I would be happy to be true.
Another important reason is the need to do callbacks.
Keep in mind that mod_jk has very tight performance
requirements. That's the reason we don't have a single protocol,
but mod_jk allows multiple protocols.
> 2. As I mentioned in my previous email, I have
> already implemented http worker (very similar to ajp12
> and ajp13 worker, with HTTP 1.0) in mod_jk. And it
> works with Tomcat, Orion, JServ without any problem.
Well, that's just great ! I think a http worker would be
a great addition to mod_jk, and will be a good solution
for some problems.
> for the great design of mod_jk!) When I compare the
> performance between mod_jk/http/Tomcat and
> mod_jk/ajp12/Tomcat, I can not see any difference.
Yes, mea culpa for that - I spent a lot of time
(stupidly) optimizing the HTTP adapter, and not so
much on ajp13.
BTW, ajp12 isn't going to be changed and it's quite
bad as performance ( as it uses a new connection per
request ), you should compare with ajp13.
> 3. I am working on implementing http 1.1 in my http
> worker of mod_jk to take advantage of its persistant
> connection with "KeepAlive" option. Once I am done, I
> can compare the performance between
> mod_jk/http1.1/Tomcat with mod_jk/ajp13/Tomcat because
> ajp13 has persistant connection too.
You can take a look at mod_proxy, which does
similar things.
But keep in mind that tomcat 3 doesn't implement
HTTP/1.1. It would be easy to backport the implementation
from tc4, but there are better things to do.
> 5. Essentially, there is no difference between ajpxx
> and http protocol in terms of forwarding the request
> from the web server side to the web container side.
> The only difference is the protocol itself.
Well, I think that's more of an accident :-)
> 6. So, my conclusion is, if there is no performance
> difference, with the advantage of that http can cross
> firewall and almost all web containers support have
> http listeners, why http is not used in either
> mod_jserv, mod_jk or mod_webapp? I must have missed
> some points. :-)
There is only one reason for not having a http
protocol in mod_jk - nobody wrote one so far :-)
BTW, you can configure mod_jk load balancing to use
multiple protocols - like ajp13 for local workers,
http for over-the-firewall workers, etc.
Good luck with the experiments, looking forward to
see code,
Costin