Graham Leggett wrote:
Henri Gomez wrote:
And what about using AJP/1.3 instead of HTTP for connection to tomcat ?)
In all my deployments of tomcat I have never seen the point of a custom protocol that did exactly what HTTP does, so all my tomcat deployments are all HTTP, with a simple mod_proxy frontend.
Well AJP/1.3 save cycle in tomcat avoiding it to re-decode headers for examples. It forward also the SSL infos if needed. And AJP/1.3 use persistant connections so it safe cycle also.
jk was designed a long time ago so may be mod_proxy allready support persistant connections.
Even the "get Apache to server static content" feature wasn't enough of a drawcard, as proper HTTP cache handling and a suitable cache solved this problem. It was far more important for me to arrange the web application as a self contained unit - I would rather be more tidy with an install at the expense of a slightly higher load, than sacrifice a clean install to save some cycles.
- If you add load-balancing/fault-tolerance and AJP 1.3 support in mod_proxy you'll have about 99% of the current functionalities of jk 1.2.x.
We discussed also the need for some dynamic mapping and topology discovery/update (between Apache and Tomcats Clusters).
Proxy has a placeholder in it that says "put the code to make decision about load balancing etc here" - all that is needed is a hook and a module "proxy_loadbalancing.c" to make it happen.
Great. And if you handle in the proxy_loadbalancing.c the JSESSION_ID, (sticky session) to map next requests to the tomcat who set it, you'll have everything needed.
Of course you should also handle some mixed cases, like full round-robin, and sticky round-robin.
The idea is interesting.
And in fine, we like to have some JMX like functionnalities in Apache 2, in our case CMX for C Management Extension, a way to update Apache 2.x configuration while the server is running...
This is possibly a whole separate project in itself.
I have been meaning to work on a get-apache-config-out-of-ldap extension for a while, what it really should be is "get apache config out of wherever", but this should be an Apache wide thing, not limited to a single module or technology.
Well LDAP could be use for configuration outside a file. JMX/CMX goes a bit farther since it let you update some characteristics at runtime.
But I agree that providing a JMX/CMX facade to Apache 2.x modules will be a good starting point. Costin will certainly clarify this point with you.
In fine the discussed mod_ajp module should detect topology change in a
second phase to learn for example that a tomcat in a cluster started/stopped a web application, so next requests could be redirected
to another tomcat in the cluster. Also you should be able to update the
load factor for each tomcat, may be having a load factor by Webapplication.