Cofluence 3.1 on standalone with Oracle 10g Cluster.
In weblogic there is a multi datasource which from my understanding is load balancing between datasource 1 and datasource 2.
Is there a way to do this in Tomcat?
Community moderators have prevented the ability to post new answers.
Hi Bron,
I had a whole paragraph ready for you and then answers went down. SO, now I'm forced to retype what I typed up a couple hours ago before the site went down....
Ok. So what I said previously, was something like this. What I think you want to do is loadbalance apache in front of two tomcat instances that run against separate datasources.
https://confluence.atlassian.com/display/DOC/Apache+and+Tomcat+load+balancing
You'll do this with the mod_proxy and reference them via the workers.properties file in apache as described here:
https://wikis.nyu.edu/display/DOC/Apache+and+Tomcat+load+balancing
This doesn't seem as descriptive as my first response, but let me know if this points you in the right direction.
Hope this helps!
Each instance of tomcat would have a different server.xml with it's unique datasource.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Ryan.
I will try that. I was a little confused because with weblogic, the datasource listed in confluence-cfg.xml file on both nodes is the multi source(load balancing).
Are you saying I just configure datasource 1 in server.xml on node 1 and datasource 2 in server.xml on node 2 and then use the above to load balance between the two?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bron,
Yup, that's exactly what I'm saying. The load balancer should handle.... balancing the load :) between the two tomcat instances. Each TC instance referencing it's own datasource. I'm wondering though, if you're referencing two different datasources, aren't you going to have two different sets of data? Is this a failover mechanism you're trying to put in place so that if you have to you can have database replication and then flip the switch to datasource 2?
Ryan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ryan,
Actually I have two nodes in a cluster with the same data. It is more of a failover mechanism, if one datasource is down it will switch to the other.
Thanks,
Bron
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Understood. If that answers the solution for you let us know here!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Load balancing / failover shouldn't exactly happen at the data source layer. This should be done by the data source itself - virtual IPs, anycast on the dns or any other technical providing transparent load balancer / failover.
This should be independent of Tomcat.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.