I am testing XtraDB Cluster. I see that when we first install it for three nodes cluster, We set wsrep_cluster_address null for node1, and set wsrep_cluster_address as node1 for nodes node2 and node3.
If I want to add new node or failed node again, I should set wsrep_cluster_address to one of healthy nodes.
My question is; does XtraDB cluster supports floating IP by own? If yes,How can I implement it?
I only set the wsrep_cluster_address parameter to floating IP, and never change it again. By this, I can add node only starting mysql.
No, there is no floating ip by default.
If you add a new node (or restart the first one in your case) you need to change the value of wsrep_cluster_address to a different running node.
If primary node in cluster is down, how can I add it again?
Do I understand correctly that former primary node can be added to any healthy (synced) node?
In Galera cluster there is no “primary” node, all nodes are of the same rank, but may differ by the state they are currently in (SYNCED, JOINED, etc.).
Moreover, it does not matter which node you initially connect to as long as it is a part of the primary cluster component: Galera cluster is a full undirectional graph.