+ All Categories
Home > Documents > well, why not for any other DBMS as well Seppo Jaakola – Alexey...

well, why not for any other DBMS as well Seppo Jaakola – Alexey...

Date post: 28-Jun-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
59
Galera Replication Synchronous Multi-Master Replication for InnoDB ...well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenko
Transcript
Page 1: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

Galera Replication

Synchronous Multi-Master Replication for InnoDB...well, why not for any other DBMS as well

Seppo Jaakola – Alexey Yurchenko

Page 2: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 2

Contents

1.Galera Cluster

2.Replication API

3.Benchmarking

4.Installation & Management

5.Galera Project

Page 3: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 3

Replication for Transactional DBMS

DBMS

Page 4: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 4

Replication API

DBMS

repl API

Interface for replication system➔ Calls for replication➔ Callbacks from replication

Plugin framework

Interface for replication system➔ Calls for replication➔ Callbacks from replication

Plugin framework

Page 5: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 5

Pluggable Replicator

DBMS

repl API

R e p l i c a t i o n P r o v i d e r

Provider can be loaded at DBMS start

Provider can be loaded at DBMS start

Page 6: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 6

Galera Cluster

InnoDB

wsrep

G a l e r aR e p l i c a t i o n

For MySQL/InnoDBFor MySQL/InnoDB

Page 7: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 7

Galera Cluster

InnoDB

wsrep

G a l e r aR e p l i c a t i o n

For MySQL/InnoDBFor MySQL/InnoDB

wsrep extension implements replication API

wsrep extension implements replication API

Page 8: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 8

Galera Cluster

InnoDB

wsrep

G a l e r aR e p l i c a t i o n

For MySQL/InnoDBFor MySQL/InnoDB

wsrep extension implements replication API

wsrep extension implements replication API

dynamically loaded library

dynamically loaded library

Page 9: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 9

Galera Cluster

Clients

InnoDB

wsrep

Transparentconnections

G a l e r aR e p l i c a t i o n

Page 10: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 10

Multi Master

Clients

InnoDB

wsrep

Transparentconnections

Multi-master

G a l e r a R e p l i c a t i o n

Page 11: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 11

Multi Master

Clients

InnoDB

wsrep

InnoDB

wsrep

Transparentconnections

Multi-master

G a l e r a R e p l i c a t i o n

Page 12: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 12

Multi Master

Clients

InnoDB

wsrep

InnoDB

wsrep

InnoDB

wsrep

Transparentconnections

Multi-master

G a l e r a R e p l i c a t i o n

Page 13: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 13

Synchronous Replication

Clients

InnoDB

wsrep

InnoDB

wsrep

InnoDB

wsrep

Transparentconnections

Multi-master

Synchronousreplication

G a l e r a R e p l i c a t i o n

Page 14: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 14

Galera Replication

● Synchronous multi-master replication ➔ High Availability

● No middle-ware, connections directly to DBMS➔ Transparency

● Row events, row level locking➔ Write scalability

● Certification based replication method

Page 15: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 15

G a l e r a R e p l i c a t i o nG a l e r a R e p l i c a t i o n

Client

Synchronous Replication

wsrep wsrepwsrep

trx

commit

Page 16: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 16

G a l e r a R e p l i c a t i o nG a l e r a R e p l i c a t i o n

Client

Synchronous Replication

wsrep wsrepwsrep

trx

WS

commit

Transaction is replicatedto all nodes => HA

WS

Page 17: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 17

G a l e r a R e p l i c a t i o nG a l e r a R e p l i c a t i o n

Client

Synchronous Replication

wsrep wsrepwsrep

trx trx

Transaction is applied at later time=> virtual synchrony

Page 18: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 18

Certification Based Replication

● Transactions process independently in each cluster node

● Transaction write sets will be replicated at commit time

● Cluster wide conflicts resolved by certification test

Page 19: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 19

write set population

write set applierQuery Processing

MySQLMySQL

certificationtestWS extract

replication

Group Communication

replication

certificationtest

Client

Page 20: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 20

write set population

write set applierCommit Processing

MySQLMySQL

certificationtestWS extract

replication

Group CommunicationWS

replication

certificationtest

Client

commit

Page 21: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 21

write set population

write set applierCommit Processing

MySQLMySQL

certificationtestWS extract

replication

Group CommunicationWS

replication

certificationtest

Client

Page 22: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 22

write set population

write set applier

commit

rollback

Commit Processing

MySQLMySQL

certificationtestWS extract

replication

Group Communication

replication

certificationtest

Client

WS

Page 23: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 23

Replication API

Page 24: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 24

Replication API

● Galera integrates closely in DBMS transaction processing

➔ There must be an interface between DBMS and replication system

Page 25: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 25

Other Replication APIs

● MySQL's API cooking up:➔

● Drizzle's API, already there:➔

● MariaDB specifying new API➔

http://forge.mysql.com/wiki/MySQL_Replication:_Walk-through_of_the_new_5.1_and_6.0_features

http://www.jpipes.com/index.php?/archives/290-Towards-a-New-Modular-Replication-Architecture.html

https://lists.launchpad.net/maria-developers/msg01998.html

Page 26: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 26

wsrep API

● Codership's replication API● DBMS agnostic replication interface● Defines:– Write Set replication for transactions– TO isolation for replicating DDL

● Suitable for different replication modes (sync/async, multi-master, master/slave, PITR...)

● https://launchpad.net/wsrephttps://launchpad.net/wsrep

Page 27: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 27

wsrep API Implementation

● Replication provider library load/unload● Write set population calls● Write set replication calls (at commit)● Prioritized transactions– Lock queue modified– Aborting local victims

● Configuration hooks● Status hooks● TO isolation for DDL queries

Page 28: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 28

Galera Library

DBMS

wsrep provider

GCS framework

replication

wsrep hooks wsrep API dlopen

Galeracertification

vsbes gcommspread

Page 29: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 29

Benchmarking

Page 30: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 30

Benchmarking

● Tested with several benchmarks– Sysbench, dbt2, DOTS, osdb, jmeter, sqlgen...

● Tested with 'physical hardware' and with Amazon EC2 instances

➔ In general, shows good scalability even with write intensive work loads

Page 31: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 31

SysBench Benchmarks

● SysBench OLTP mode test● 1M rows● EC2 Large instances

nodes users trx/s deadlks 95%lat--------------------------------------1 18 385 0 0.0922 36 761 2.54 0.1003 45 900 3.42 0.1034 60 1034 4.54 0.120official 5.1.33 binary:1 18 451 0 0.079

Page 32: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 32

Synchronous WAN Replication

● SysBench OLTP● 1M rows● EC2 large instances● EU → US● Distance: ~3000 miles● Ping RTT: ~88 ms

Page 33: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 33

Installation

Page 34: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 34

Installing MySQL/Galera

Download from www.codership.com

Distributions choices:1.Pre-built RPM or Debian package2.demo tar distribution3.Source build

Page 35: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 35

Demo Distribution

● Pre-built 32/64 bit linux binaries● Installs in one directory path● Contains a sample database

● Good for testing/evaluation

Page 36: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 36

Demo Distribution

● Install as regular user (not root)$ tar xzf mysql­5.1.43­galera­0.7.3­x86_64.tgz

● Node startup by: mysql-galera script– Commands: start | stop | check

● Specify cluster_address– Start first node with address: gcomm://– Start other nodes with gcomm://<first-node-ip>

$ mysql­galera ­g gcomm:// start$ mysql­galera ­g gcomm://<other­IP> start

Page 37: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 37

Galera in Cloud

● VPS.net– Nice new cloud computing solution– MySQL/Galera images available

● Amazon EC2– Extensively tested in EC2– Deploy .e.g. Ubuntu node and install

MySQL/Galera manually– Pre-built image underway

Page 38: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 38

Cluster Topologies

➔ Use 3 or more nodes for HA➔ Application load balancing gives best

performance➔ Use load balancer if a single connection

point is needed➔ Reference node can help in joining

Page 39: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 39

Dedicated Replication Interconnection

SW

SW

10.0.0.1 10.0.0.2

192.168.0.2192.168.0.1

Public connectionsPublic connections

Min 1 Gb/secreplication network

Min 1 Gb/secreplication network

Page 40: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 40

C l i e n t

Application Load Balancing

Connectionpool + Gives best performance

- Application must react to cluster changes

Page 41: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 41

C l i e n t

Load Balancer

● HW balancers● IP dispatching in kernel

e.g. LVS● TCP/IP load balancers

.e.g. GLB, in user land● Proxy (.e.g. MySQL Proxy)

Load Balancer

in order of performance:

Page 42: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 42

G a l e r a R e p l i c a t i o n

Reference Node

C l i e n t s

No client connections

● Works as donor for joining nodes

● Backups by xtrabackup

Page 43: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 43

G a l e r a R e p l i c a t i o n

Reference Node as MySQL Master

C l i e n t s

MySQL slaveMySQL master

Page 44: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 44

Management

Page 45: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 45

mysql> show variables like 'wsrep%';+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+| Variable_name                  | Value                                                         |+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+| wsrep_auto_increment_control   | ON                                                            | | wsrep_cluster_address          | gcomm://                                                      | | wsrep_cluster_name             | my_wsrep_cluster                                              | | wsrep_convert_LOCK_to_trx      | OFF                                                           | | wsrep_data_home_dir            | /home/galera/mysql­5.1.42­2957,1439/mysql/var/                | | wsrep_dbug_option              | NULL                                                          | | wsrep_debug                    | OFF                                                           | | wsrep_drupal_282555_workaround | ON                                                            | | wsrep_local_cache_size         | 20971520                                                      | | wsrep_node_incoming_address    | 10.0.0.121:3306                                               | | wsrep_node_name                | abyssinian                                                    | | wsrep_on                       | ON                                                            | | wsrep_provider                 | /home/galera/mysql­5.1.42­2957,1439/galera/lib/libmmgalera.so | | wsrep_provider_options         | NULL                                                          | | wsrep_retry_autocommit         | ON                                                            | | wsrep_slave_threads            | 1                                                             | | wsrep_sst_auth                 | root:rootpass                                                 | | wsrep_sst_donor                | NULL                                                          | | wsrep_sst_method               | mysqldump                                                     | | wsrep_sst_receive_address      | AUTO                                                          | | wsrep_start_position           | NULL                                                          | | wsrep_ws_persistency           | OFF                                                           | +­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+22 rows in set (0.00 sec)

wsrep Variables

Page 46: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 46

wsrep Variables

● wsrep_provider– Path to provider library

● wsrep_cluster_address – tells the connection point where node can join– 'gcomm://' for first node– 'gcomm://<IP address>', for joining nodes

Page 47: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 47

wsrep Status

mysql> show status like 'wsrep%';+­­­­­­­­­­­­­­­­­­­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+| Variable_name             | Value                                |+­­­­­­­­­­­­­­­­­­­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+| wsrep_local_state_uuid    | 0eedf650­1694­11df­0800­6227ab0639e3 | | wsrep_last_committed      | 3                                    | | wsrep_replicated          | 0                                    | | wsrep_replicated_bytes    | 0                                    | | wsrep_received            | 0                                    | | wsrep_received_bytes      | 0                                    | | wsrep_local_commits       | 0                                    | | wsrep_local_cert_failures | 0                                    | | wsrep_local_bf_aborts     | 0                                    | | wsrep_flow_control_waits  | 0                                    | | wsrep_local_status        | Joined (5)                           | | wsrep_cluster_conf_id     | 1                                    | | wsrep_cluster_size        | 1                                    | | wsrep_cluster_state_uuid  | 0eedf650­1694­11df­0800­6227ab0639e3 | | wsrep_cluster_status      | Primary                              | | wsrep_local_index         | 0                                    | | wsrep_ready               | ON                                   | +­­­­­­­­­­­­­­­­­­­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+17 rows in set (0.00 sec)

Page 48: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 48

wsrep Status

● wsrep_last_committed– Tells which transaction has committed last

● wsrep_local_cert_failures● wsrep_local_bf_aborts– How much cluster caused rollbacks

● wsrep_flow_control_waits– How much wait for flow control

Page 49: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 49

Backups

● No direct backup method in 0.7 release :(

● To get a backup➔ Join/depart a node in a cluster➔ Use reference node as MySQL master and fan out

to a backup slave➔ Use xtrabackup in reference node to get hot

backup

Page 50: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 50

Joining New NodesJoining New Nodes

Clients

MySQL MySQL MySQL

A c t i v e c l u s t e r Joining node

wsrep_cluster_address= 10.0.0.2

SST Request

10.0.0.1 10.0.0.2 10.0.0.3

Page 51: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 51

Joining New NodesJoining New Nodes

Clients

MySQL MySQL MySQL

10.0.0.1 10.0.0.2 10.0.0.3

Donor node

1. mysqldump

2. load

Page 52: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 52

Joining New Nodes

Clients

MySQL MySQL MySQL

A c t i v e c l u s t e r

10.0.0.1 10.0.0.2 10.0.0.3

Page 53: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 53

Galera Project

Page 54: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 54

2008 20102009

Galera Project

0.7.1

0.7.2

0.7.3

Kick offKick off

First publicreleases

First publicreleases

0.7 releaseFully open source

0.7 releaseFully open source

Page 55: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 55

Release 0.7

● Current release 0.7.3– Stable release– Production readiness– Open source

● Simple management & installation utilities

● State transfer by mysqldump

● “Reasonably” good performance

Page 56: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 56

2010 2011

Road Map

Stability milestone

0.7 releases0.7.4...

Optimization milestone

➔Incremental backups➔Xtrabackup➔UDP multicast

Optimization milestone

➔Incremental backups➔Xtrabackup➔UDP multicast

Management milestone

➔Cluster commands➔Management console

Management milestone

➔Cluster commands➔Management console

Page 57: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 57

Summary

● Certification based replication turns out effective– High Availability – Transparency– Good scalability even with high write rates

● wsrep API is “not too hard” to implement● Any (transactional) DBMS can leverage this

replication possibility

Page 58: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 58

Codership – The Saga

● Founders Seppo Jaakola, Alexey Yurchenko, Teemu Ollakka

● Fin-Rus community working from Finland● Experts in distributed systems & DBMS

development, information security ● Set Sail Oct 2007● Projects:

– Galera– GLB (Debian ITP)– Cluster testing framework (in-house)

Page 59: well, why not for any other DBMS as well Seppo Jaakola – Alexey Yurchenkoassets.en.oreilly.com/1/event/36/Galera - Synchronous... · 2010-04-15 · April 14, 2010 Codership @ MySQL

April 14, 2010 Codership @ MySQL Conference 2010 59

Get in Touch!

● R&D consulting services● Support subscriptions

● Downloads available: http://www.codership.com● [email protected]● Mailing list: [email protected]


Recommended