nginx as loadbalancer for tomcat with session stickyness bases on jvmRoute

Thomas Glanzmann thomas at glanzmann.de
Wed Jul 17 15:39:52 UTC 2013


Hello everyone,
I'm currently using apache mod_jk to load balance over four backend
tomcat servers. The sessions are not replicated so I need stickyness
based on jvmRoute. The mod_jk configuration is:

worker.list=router, jkstatus

worker.router.type=lb
worker.router.balance_workers=tomcat-01, tomcat-02, tomcat-03, tomcat-04

worker.tomcat-01.type=ajp13
worker.tomcat-01.host=tomcat-01
worker.tomcat-01.port=8009
worker.tomcat-01.lbfactor=1

worker.tomcat-02.type=ajp13
worker.tomcat-02.host=tomcat-02
worker.tomcat-02.port=8009
worker.tomcat-02.lbfactor=1

...

worker.jkstatus.type=status

I would like to replace apache with nginx. What ways exist to do that
and what are the pros and cons? I use Debian Wheezy and would like to
stick if possible with the packaged nginx.

What about tomcat maintenance? I would like the ability gracefully reroute
traffic (taking a tomcat in maintance let still existing sessions to get
through but not route any new connections to a particular tomcat).

Cheers,
        Thomas



More information about the nginx mailing list