Galera
Maria Galera is a fast, synchronous, multi-master, distributed database solution. It has these features:
Virtual synchronous replication
Active-active multi-primary topology
Read/write to any cluster node
Automatic membership control, failed nodes drop from cluster
Automatic node joining
True parallel replication, on row level
Direct client connections, native MariaDB look & feel
![digraph maria_galera {
// rankdir=TB; // Optional: use LR for left-to-right
layout=neato
bgcolor="darkblue";
edge [color="white"; penwidth=2]; // Edges in white
// Define nodes with specific positions
A [style=filled, fillcolor="white", fontcolor="black", label="Node-A", pos="0,1.4!"];
B [style=filled, fillcolor="white", fontcolor="black", label="Node-B", pos="-1.4,0!"];
C [style=filled, fillcolor="white", fontcolor="black", label="Node-C", pos="1.4,0!"];
D [style=filled, fillcolor="white", fontcolor="black", label="Node-D", pos="0,-1.4!"];
A -> B -> C -> D -> A [dir = both];
A -> C [dir = both];
B -> D [dir = both];
}](../../../../_images/graphviz-d97dcfcfd96bb491eb2ca0d30d87ff850f54254a.png)
Maria Galera Cluster: Each node will read/write
Although Galara nodes can all read and write data, you still want to put a load balancer in front of it in order to scale operations:
![digraph maria_galera {
rankdir=TB; // Optional: use LR for left-to-right
layout=neato;
bgcolor="darkblue";
edge [color="white"; penwidth=2]; // Edges in white
splines=curved;
// Define nodes with specific positions
A [style=filled, fillcolor="white", fontcolor="black", label="Node-A", pos="0,1.4!"];
B [style=filled, fillcolor="white", fontcolor="black", label="Node-B", pos="-1.4,0!"];
C [style=filled, fillcolor="white", fontcolor="black", label="Node-C", pos="1.4,0!"];
D [style=filled, fillcolor="white", fontcolor="black", label="Node-D", pos="0,-1.4!"];
A -> B -> D -> C -> A [ dir = both];
B -> C [dir = both];
A -> D [dir = both];
LB [style=filled, fillcolor="white", fontcolor="black", label="Load\nBalancer", pos="0,2.4!"];
LB -> A:n [label="read/write"; color=red; fontcolor="white"];
LB -> B:nw [color=red; fontcolor="white"];
LB -> C:n [color=red];
LB -> D:ne [color=red];
}](../../../../_images/graphviz-7419beb33b096dd3259b5e2f0dbe53a7d89872c0.png)
Maria Galera Cluster with Load Balancer
See https://mariadb.com/kb/en/what-is-mariadb-galera-cluster/ for more details.