Codership is there to secure our customers’ invaluable data.
We do this by providing high availability, no-data-loss and
s...
What is the Meaning of Galera ?
Turns out it has different semantics in:
●

Italy

●

Uruguay

●

Brazil

●

Spain, Portug...
Galera in Italy
Che cosa significa la parola galera?

Jail / Prison

www.codership.com

3
Galera in Uruguay
Que significaca galera en Uruguai?

Traditional tall hat

www.codership.com

4
Galera in Brazil

A Group of Happy People

www.codership.com

5
Galera in Spain, Portugal, Russia...

Galley
www.codership.com

7
Asynchronous Replication

Can be a mess....
www.codership.com

8
Synchronous Replication

That's more like it !!
www.codership.com

9
Synchronous Multi-Master Replication

MariaDB
Galera Replication

www.codership.com

10
Synchronous Multi-Master Replication

There can be several nodes

MariaDB

MariaDB

Galera Replication

www.codership.com
...
Synchronous Multi-Master Replication

There can be several nodes

MariaDB

MariaDB

MariaDB

Nodes can be added on the fly...
Synchronous Multi-Master Replication

Client can connect to any node
There can be several nodes

MySQL

MySQL

MySQL

Node...
Synchronous Multi-Master Replication

read & write

read & write

read & write

Read & write access to any node
Client can...
Synchronous Multi-Master replication

read & write

read & write

read & write

Read & write access to any node
Client can...
Multi-Master Replication

read & write

read & write

read & write

Multi-master cluster looks
like one big database with
...
Synchronous Replication

Transaction is
processed locally up
to commit time

Read & write

MariaDB

a

MariaDB

MariaDB

G...
Synchronous Replication

Transaction's write
set is replicated to
whole cluster

commit

MariaDB

Slave queue

MariaDB

Ma...
Synchronous Replication

Client gets OK
status

OK

MariaDB

Slave queue

MariaDB

MariaDB

Slave queue

Galera Replicatio...
Synchronous Replication

Transaction is
applied in slaves

MariaDB

Slave queue

MariaDB

MariaDB

Slave queue

Galera Rep...
How node failures are handled

Load Balancing

a

MariaDB

MariaDB

MariaDB

Galera Replication
www.codership.com

21
Quorum, handling the failure
● Galera uses quorum based failure
handling:
– When cluster partitioning is
detected, the maj...
Optimistic Concurrency Control

commit

commit

Trx A

Trx B

A

B

Galera Replication
www.codership.com

23
Optimistic Concurrency Control

●Transactions process independently in
each cluster node
●Transaction write sets will be r...
Parallel Replication

MariaDB
Slave thd

Slave thd

Any number of slave applier
threads can be started
Slave control assig...
Galera Cluster benefits

➢

Synchronous multi-master cluster
no data loss
➢
no slave lag
➢
No complex slave failover
➢

➢
...
Galera Cluster benefits

➢

Good Performance and scalability
Optimistic concurrency control
➢
Parallel Replication
➢
Optim...
Codership Company
●
●

●
●
●
●

Established 2007
Three MySQL Clusters before Galera
Cluster
Open source + support sales
Ac...
Who is using Galera?

29
Mercadolibre OpenStack Galera
deployment

If you live in Latin America (and even if you don't) you
most likely know the on...
Galera Project
MySQL Community Edition

Galera Cluster for MySQL

MariaDB

MySQL
merg
e

e
erg
m

MariaDB

MySQL
API
Maria...
Galera Project
MySQL Community Edition

Galera Cluster for MySQL

MySQL

MariaDB

MySQL
API

MariaDB Galera Cluster

merge...
Galera Support

SkySQL

Support Subscriptions

Codership

Level 3 support, Galera

Galera
Cluster

MontyProgram

Level 3 S...
More info
www.codersip.com
Sakari.keskitalo@codership.com
SkySQL.com
Mariadb.org
Galera cluster - SkySQL Paris Meetup 17.12.2013
Upcoming SlideShare
Loading in...5
×

Galera cluster - SkySQL Paris Meetup 17.12.2013

1,039

Published on

Galera cluster - Sakari Keskitalo at the SkySQL Paris Meetup 17.12.2013

Published in: Technology, Travel
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,039
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
16
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Galera cluster - SkySQL Paris Meetup 17.12.2013

  1. 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. 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. 3. Galera in Italy Che cosa significa la parola galera? Jail / Prison www.codership.com 3
  4. 4. Galera in Uruguay Que significaca galera en Uruguai? Traditional tall hat www.codership.com 4
  5. 5. Galera in Brazil A Group of Happy People www.codership.com 5
  6. 6. Galera in Spain, Portugal, Russia... Galley www.codership.com 7
  7. 7. Asynchronous Replication Can be a mess.... www.codership.com 8
  8. 8. Synchronous Replication That's more like it !! www.codership.com 9
  9. 9. Synchronous Multi-Master Replication MariaDB Galera Replication www.codership.com 10
  10. 10. Synchronous Multi-Master Replication There can be several nodes MariaDB MariaDB Galera Replication www.codership.com 11
  11. 11. Synchronous Multi-Master Replication There can be several nodes MariaDB MariaDB MariaDB Nodes can be added on the fly Galera Replication www.codership.com 12
  12. 12. 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
  13. 13. 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
  14. 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 Galera Replication Add nodes on the fly Replication is synchronous Each node have identical data www.codership.com 15
  15. 15. 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
  16. 16. Synchronous Replication Transaction is processed locally up to commit time Read & write MariaDB a MariaDB MariaDB Galera Replication www.codership.com 17
  17. 17. Synchronous Replication Transaction's write set is replicated to whole cluster commit MariaDB Slave queue MariaDB MariaDB Slave queue Galera Replication www.codership.com 18
  18. 18. Synchronous Replication Client gets OK status OK MariaDB Slave queue MariaDB MariaDB Slave queue Galera Replication www.codership.com 19
  19. 19. Synchronous Replication Transaction is applied in slaves MariaDB Slave queue MariaDB MariaDB Slave queue Galera Replication www.codership.com 20
  20. 20. How node failures are handled Load Balancing a MariaDB MariaDB MariaDB Galera Replication www.codership.com 21
  21. 21. 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
  22. 22. Optimistic Concurrency Control commit commit Trx A Trx B A B Galera Replication www.codership.com 23
  23. 23. 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
  24. 24. 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
  25. 25. 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
  26. 26. 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
  27. 27. 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
  28. 28. Who is using Galera? 29
  29. 29. 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.
  30. 30. 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
  31. 31. 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
  32. 32. Galera Support SkySQL Support Subscriptions Codership Level 3 support, Galera Galera Cluster MontyProgram Level 3 Support, MariaDB MariaDB Galera Cluster www.codership.com 33
  33. 33. More info www.codersip.com Sakari.keskitalo@codership.com SkySQL.com Mariadb.org
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×