As stated by the Galera documentation, the cluster uses synchronous replication. But looking a bit deeper, there are statements, that Galera is only "virtually" synchronous. On the nodes, a commit has to pass a "certification" instead a physical commit. I really need to understand this part to plan the architecture of an application.
So I like to now which of the following cases would be true if any:
Script A does an UPDATE in a transaction taking approximate 5 seconds and a COMMIT takes a few seconds either. A Script B follows when Script A is finished immediately, for example with a HTTP-Redirect after HTTP-POST-Request within a second. Script B queries a different node than script A.
- Script B gets the status before the
UPDATEbecause theUPDATEstill needs around 4 seconds to finish. - Script B gets the status after the
UPDATEbecause theCOMMITfinishes when the state of all nodes is synchronous.
Which one would be true if any? Or is the behavior dependent on configuration?