Reputation: 1755
Enviroment:
My application is deployed on two Tomcats, each one configured with a unique port (8081 and 8082).
I need a way to configure an new port (8080) and load balance between the two tomcats automatically.
Currently I am using the functionality TCP/IP Monitor that provides Eclipse, but this only allows me to manually routing.
I need this configuration to reproduce an error that occurs only in Prod Cluster. I'm considering using another Tomcat as balancer, but I'm not sure that this is the best option. Anyone has a better idea?
Thanks!
Upvotes: 3
Views: 445
Reputation: 34470
Nginx with Upstream should be the best option for you. Look here. Its configuration is straightforward and you can use either round-robin or ip_hash (useful for sticky sessions), whichever scenario suits you best.
Upvotes: 1
Reputation: 6124
If you are trying to reproduce an error in prod, you should try to reproduce the same environment in dev. Assuming you are on tomcat 6 or higher, the three options that come to mind are
1. Load balancer
2. Apache front-end with mod_proxy
3. Apache front-end with mod_jk
Upvotes: 1