Following is my setup. I have an apache server and mod_jk module for loadbalancing 2 tomcat servers with sticky session enabled. The file upload directly to each tomcat is much faster than uploading through apache. We found the MPM module will make some difference for large threads. so we are using that also. Now With just one thread and large file its much slower than accessing the tomcat server directly. [00:33 vs 4:30].
Apache version 2.4.3 Mod_jk version 1.2.15 Tomcat 6
LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile logs/jk.log
JkLogLevel debug
JkMount /* router
JkMount /jk_status status
<Location /server-status>
SetHandler server-status
Allow from 192.168.188.143
</Location>
<IfModule unixd_module>
User daemon
Group daemon
</IfModule>
worker.list=router,status
worker.worker1.port=8009
worker.worker1.host=192.168.188.128
worker.worker1.type=ajp13
worker.worker1.lbfactor=1
worker.worker1.sticky_session=1
worker.worker2.port=8009
worker.worker2.host=192.168.188.129
worker.worker2.type=ajp13
worker.worker2.lbfactor=1
worker.worker2.sticky_session=1
worker.router.type=lb
worker.router.balanced_workers=worker1,worker2
worker.status.type=status
Please Help!!! Have I missed some important settings ? Please let me know
We did some further debugging on slow apache file upload operations and got the root cause of slowness as described below:
We were using mod_jk connector for making apache talk to tomcat servers and it was having two problems:
After this we did some tests using http connector (via mod_proxy) and load balancer (via mod_proxy_balancer) and have achieved excellent results