In official doc Galera Use Cases for the very first use case I read the following:

"Traditional MariaDB master-slave topology, but with Galera all "slave" nodes are capable masters at all times - it is just the application that treats them as slaves. Galera replication can guarantee zero slave lag for such installations and, due to parallel slave applying, much better throughput for the cluster."

It is not clear, why should any application treat all nodes except one as slaves? It requires extra effort to split read and write SQL commands, if it is possible at all, I mean depending on application development style. (I do know MaxScale readwritesplit, but this is out of topic here)


Why should any application treat all nodes except one as slaves in a Galera cluster?

1 Answer 1


The quoted paragraph describes a "use case", but does not necessarily "recommend" it.

  • Many developers are coming from a traditional replication setup with one Primary and multiple Replicas.
  • When writing, one sometimes needs to do some supporting reads; they need to be performed on the same machine.
  • If they don't need the scaling provided by multiple servers, why bother building the Proxy to spread out the actions.
  • They may need only the HA features, not the scaling.

On the other hand, if one node goes down, it is less work (for the DBA) if the other nodes are already writable and accessible via a Proxy.

I agree with you, design it for all nodes to be read-write. And provide some proxy mechanism. And preface "critical" SELECTs with the setting to make sure the data has been flushed. "Guarantee zero slave lag" is stretching it. But very close.

  • many thx, this makes sense. Btw the other use cases on that very page also raise questions, but It be more useful if I post those in other dedicated posts. Commented Jan 22, 2023 at 4:21
  • @g.pickardou _yes, other posts. What type of app are you considering putting on Galera? There may be other aspects to consider. How far apart (network latency) will the nodes be? Will you have "critical reads"? How much data? Queries/second? The main goal (HA/scaling/etc)?
    – Rick James
    Commented Jan 22, 2023 at 7:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.