HA AND LOAD BALACING
Hi ,
I am working on load balancing now and have some doubt.
I have a 3 node cluster.
node_name node_address
v_pmdb_node0001 10.180.45.217
v_pmdb_node0002 10.180.45.219
v_pmdb_node0003 10.180.45.218
I did the load balacing step using the java code ConnectionLoadBalancingExample.java present in
and its working also.
[root@shrdevesx1 ~]# java -cp vertica-jdbc-7.0.2-1.jar:. ConnectionLoadBalancingExample
Connect attempt #1...Connected to node v_pmdb_node0001
Connect attempt #2...Connected to node v_pmdb_node0002
Connect attempt #3...Connected to node v_pmdb_node0003
Now my doubt is if I connect my squirrel client to node1 and lets say node1 is down then how I can execute my sql from node1 which in the backend will be connected to node2 or node3.
How load balacing is connected to High availability.
Please claify my doubt.
Regards,
Deb
Comments
I don't think there is any connection between the two of them.(your database must be up to be able to use Load Balance)
The Client will check which ever nodes are up and from that list will choose to which to connect depending on the load balance policy you have set.
If you HA was broken you database will be down. HA is managed by the K-safety of your database.
Or at least is what i understand of it.
Hi Adrian,
For HA , the Ksafe is already 1 in my cluster.
I have a 3 node cluster.
node_name node_address
v_pmdb_node0001 16.184.45.217
v_pmdb_node0002 16.184.45.219
v_pmdb_node0003 16.184.45.218
How I can do the HA here . Means if i have connected my BO to node1 and node1 will be down for sometime then how the switching will happen to node2 or node3 without chaning the IP in BO.
For R&D I tried the below steps.
CREATE SUBNET copy_subnet WITH '16.184.45.219';
CREATE NETWORK INTERFACE copy_node1 ON v_pmdb_node0001 with '16.184.45.217';
ALTER DATABASE pmdb EXPORT ON copy_subnet;
ALTER NODE v_pmdb_node0001 EXPORT ON copy_node1;
Please tell me the steps to complete this.
Please hepl me out as I am new to vertica.
Thanks,
Deb
Not sure i quite understand your question.
I think you are talking about standby nodes ?
And you question how can you replace a failed node with a standby node without loosing the ipaddress.(use the same ip address for the standby node as the node that just failed).
Or you are trying to separete de import/export action to a diferent network ?
Any way i don't see any corelation with the native load balancer !
Or maybe is this!?
If you want to avoid the use of the default router for your import/export actions and the nodes that have this configured on them get down you will have to make available the subnet config to an available node.
Hi Adrian,
My question is how can I replace a failed node with a standby node without loosing the ipaddress.(use the same ip address for the standby node as the node that just failed).
Means if I have a 3 node cluster with ksafe=1 then if the node-1 fails how It can be connected to node2 or node3 internally.
Lets say my sqirrel client is connected node1 and if node1 fails then with the same configuration in sqirrel how I can execute sql which will fetch data from node 2/node3.
What all settings and steps required for this ?
Thanks,
Deb
If a node fails, and you are connected to it(was your initiatiator node) your session will fails as well, there is no way i know about where your session will be transferd internally.
Adding a standby with the same ip address as a active standby node build will not work, since creating a cluster with a standby node you will require to add that node to the database(don't rebalance the data) and them turn that added node into a stanby:
Example:
ALTER NODE node_04 STANDBY;
This node will be reserved to take the place of any node that with a status of DOWN. An active standby node does not perform any activity or contain data until it is takes the place of another node.
To replace the down node with a active(ready) standby node :
For the load balance mechanism the nodes(names/ip address) you have in your cluster is transparent, as long as the database is up.
HI Adrean,
Is there no way to switch the nodes internally if 1 nodes fails ?
Means in a 3 node cluster if node1 fails data can be fetched from node2 or node3 with out any standby beacase ksafe is already 1 here with segmentaed data.
Regards,
Deb
So yes your database will be up and ok but the k safety will go down to 0, meanningvyou loose your HA.
Hi Adrian,
Thanks for the support.
Actually we are doing a product in which we have 3 node clsuter and if the node1 fails then there should be some switch so that our customer should not face any issue in production level.
Can you suggest what to do in this case ?
How to achive HA here.
Regards,
Deb