1. Codership is there to secure our customers’ invaluable data.
We do this by providing high availability, no-data-loss and
scalable data replication and clustering solutions
for open source databases.
2. What is the Meaning of Galera ?
Turns out it has different semantics in:
●
Italy
●
Uruguay
●
Brazil
●
Spain, Portugal, Russia...
www.codership.com
2
3. Galera in Italy
Che cosa significa la parola galera?
Jail / Prison
www.codership.com
3
4. Galera in Uruguay
Que significaca galera en Uruguai?
Traditional tall hat
www.codership.com
4
13. Synchronous Multi-Master Replication
Client can connect to any node
There can be several nodes
MySQL
MySQL
MySQL
Nodes can be added on the fly
Galera Replication
www.codership.com
13
14. Synchronous Multi-Master Replication
read & write
read & write
read & write
Read & write access to any node
Client can connect to any node
There can be several nodes
MariaDB
MariaDB
MariaDB
Nodes can be added on the fly
Galera Replication
www.codership.com
14
15. Synchronous Multi-Master replication
read & write
read & write
read & write
Read & write access to any node
Client can connect to any node
There can be several nodes
MariaDB
MariaDB
MariaDB
Galera Replication
Add nodes on the fly
Replication is synchronous
Each node have identical data
www.codership.com
15
16. Multi-Master Replication
read & write
read & write
read & write
Multi-master cluster looks
like one big database with
multiple entry points
MariaDB
www.codership.com
16
21. How node failures are handled
Load Balancing
a
MariaDB
MariaDB
MariaDB
Galera Replication
www.codership.com
21
22. Quorum, handling the failure
● Galera uses quorum based failure
handling:
– When cluster partitioning is
detected, the majority
partition "has quorum" and
can continue
– A minority partition cannot
commit transactions, but will
attempt to re-connect to
primary partition
– Note: 50% is not majority!
=> Minimum 3 nodes
arecommended.
Load Balancing
MariaDB
● Load balancer will notice errors &
remove node from pool
www.codership.com
MariaDB
MariaDB
Galera Replication
22
24. Optimistic Concurrency Control
●Transactions process independently in
each cluster node
●Transaction write sets will be replicated
at commit time (before commit)
●Cluster wide conflicts will be resolved
and conflict victim must rollback
Optimistic Concurrency Control
www.codership.com
24
25. Parallel Replication
MariaDB
Slave thd
Slave thd
Any number of slave applier
threads can be started
Slave control assigns write
sets for slave appliers
Slave control
Slave control is on ROW level
Slave queue
Only applying is parallel,
commit order is dictated
www.codership.com
25
26. Galera Cluster benefits
➢
Synchronous multi-master cluster
no data loss
➢
no slave lag
➢
No complex slave failover
➢
➢
➢
For MySQL/MariaDB InnoDB
No single point of failure
www.codership.com
26
27. Galera Cluster benefits
➢
Good Performance and scalability
Optimistic concurrency control
➢
Parallel Replication
➢
Optimized Group Communication
➢
➢
➢
➢
99.99% transparent
➢
InnoDB look & feel
Automatic node joining
Works in LAN / WAN / Cloud
www.codership.com
27
28. Codership Company
●
●
●
●
●
●
Established 2007
Three MySQL Clusters before Galera
Cluster
Open source + support sales
Active community, hundreds of users
Latest release 3.1 Galera Cluster
MariaDB Galera Cluster 5.5.33
www.codership.com
28
30. Mercadolibre OpenStack Galera
deployment
If you live in Latin America (and even if you don't) you
most likely know the online trading platform
MercadoLibre. MercadoLibre is where 58 million
consumers in Argentina, Brazil, Chile, Colombia,
Ecuador, Mexico, Peru, Uruguay, and Venezuela go to
buy and sell. Among the world's e-commerce market
leaders, MercadoLibre was recognized in 2010 as one of
the top 30 world's hottest brands.
31. Galera Project
MySQL Community Edition
Galera Cluster for MySQL
MariaDB
MySQL
merg
e
e
erg
m
MariaDB
MySQL
API
MariaDB Features
Galera Replication plugin
www.codership.com
31
32. Galera Project
MySQL Community Edition
Galera Cluster for MySQL
MySQL
MariaDB
MySQL
API
MariaDB Galera Cluster
merge
API
Galera Replication plugin
Galera Replication plugin
www.codership.com
32