Hi,
I am trying to implement HA-JDBC in our webservice application. here is our HA-JDBC configuration XML.
Now i am trying to test the balancer between the two DB configured below. In DB1, the table doesn't have any data and DB2 will have the real data.
So my assumption is whenever the connection goes to db1, it will return empty data and if it goes to db2, it will return output.
Since im giving the balancer as "round-robin", the request should goes to successive nodes. But when i tried my webservice, the connection always goes to db1 and returns no output always.
The same scenario when i tried by dropping the table from db1, first the request goes to db1 and returns empty output as there is no table at all. Next time the request goes to Db2 and returns output. After this the request always goes to db2.
Why is the request not balanced between the two DB? Is there any issue in my configuration?
Please help me in implementing.
For your information, below are my expectations,
1. The request should be balanced between two data server.
2. If any one data server fails, then the connection should goes to another data server.
First, your databases should contain identical schema and data.
Second, The balancer may be invoked for JDBC methods other than the actual statement execution (depending on your JDBC code). The only way to truly test this is to make multiple concurrent requests. You should then see that they are balanced properly. After all, there is no point in "balancing" serial load - only parallel load.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am trying to implement HA-JDBC in our webservice application. here is our HA-JDBC configuration XML.
Now i am trying to test the balancer between the two DB configured below. In DB1, the table doesn't have any data and DB2 will have the real data.
So my assumption is whenever the connection goes to db1, it will return empty data and if it goes to db2, it will return output.
Since im giving the balancer as "round-robin", the request should goes to successive nodes. But when i tried my webservice, the connection always goes to db1 and returns no output always.
Please help me in implementing.
For your information, below are my expectations,
1. The request should be balanced between two data server.
2. If any one data server fails, then the connection should goes to another data server.
<ha-jdbc xmlns="urn:ha-jdbc:cluster:3.0">
</ha-jdbc>
Thanks,
Rajesh
First, your databases should contain identical schema and data.
Second, The balancer may be invoked for JDBC methods other than the actual statement execution (depending on your JDBC code). The only way to truly test this is to make multiple concurrent requests. You should then see that they are balanced properly. After all, there is no point in "balancing" serial load - only parallel load.