TWO ways to do it. Active / active or active / passive. Active / Passive most common Data is stored in synchronization on a passive node. The cluster is a useful configuration, since the active node goes down, the passive one switches immediately, therefore, there are no downtimes. Clustering continuously synchronizes 2 nodes in a cluster.
I work with an SQL server, but I think that the basic premise of clustering for mySQL is the same - there is no (or no noticeable) downtime for a hardware failure.
EDIT: In addition, clustering software handles synchronization. You do not need to worry. You look at the cluster nodes as a virtual directory, which behaves like a single server in windows.
here is a document explaining this
http://www.sql-server-performance.com/articles/clustering/clustering_intro_p1.aspx
source share