Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

21
© 2015, MariaDB. 1 Gerry Narvaja, Technical Account Manager, MariaDB

Transcript of Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

Page 1: Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

© 2015, MariaDB.

1

Gerry Narvaja, Technical Account Manager, MariaDB

Page 2: Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

© 2015, MariaDB.

A Deep Bench of Talent

● Founded by originalMySQL creators includingMichael “Monty” Wideniusand David Axmark.

● Core MariaDB development team are employees.

● Innovative products to enhance MariaDB eco-system

2

Page 3: Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

© 2015, MariaDB.

Products and Subscriptions

24/7 Support

Technical Services

Engineering

Community

Enterprise

Contr

ibutio

ns

Core Database

Contributing To The Project,Driving Enterprise Adoption

Open SourceEngagement

Awareness

Adoption

Innovation

</>

3

Page 4: Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

© 2015, MariaDB.

MariaDB: A Unique TechnologyFoundation

● Mature high-performance corebased on MySQL.

● Application compatible with MySQL.

● Innovative performance, replication, interoperability features, improving on MySQL.

● Leverages the energy of the MySQL community.

● Open Source: GPL v2 from MariaDB Foundation.

● Widely adopted by leading Linux distributions like RHEL*, Ubuntu, Fedora*, Debian, openSUSE*.

4

Page 5: Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

© 2015, MariaDB.

MariaDB 10.0: More Capable Today,More Innovative Tomorrow

Scalability● Advanced parallel replication● Sharding● MaxScale proxy

Performance● Enhanced optimization● Improved and special purpose storage engines● Carefully tuned and enhanced server internals● Advanced performance monitoring

Availability ● HA clustering - integrating Galera cluster● More online operations, less planned downtime

NoSQL● Interoperable storage engines such as Cassandra and Connect● Dynamic columns and JSON processing● HandlerSocket API

Operations ● Comprehensive diagnostics built-in to the DB● APIs and open architecture for easier integration

Security● Role-based access control● Authentication plugins● Sophisticated auditing capabilities

5

Page 6: Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

© 2015, MariaDB.

MariaDB HA: Pieces of the Puzzle

● GTID: Global Transaction ID

● Domain ID - Server ID - Transaction seq #

● Multi-source replication

● Optional:

● Virtual IP

● Semi-sync replication

● Parallel replication / group commit

● MaxScale

● MariaDB Java connector

6

Page 7: Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

© 2015, MariaDB.

MariaDB HA: Starting Point

● A typical 4 server setup

A B

C D

Active Passive

7

Page 8: Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

© 2015, MariaDB.

MariaDB HA: Starting Point

● A typical 4 server setup

A B

C D

Active Passive

8

Page 9: Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

© 2015, MariaDB.

MariaDB HA: Starting Point

● A typical 4 server setup

A B

C D

Active Passive

9

Page 10: Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

© 2015, MariaDB.

MariaDB HA: System Variables

● GTID are always on in MariaDB 10.0

● Default domain id = 0

● Default server id = 0

● Set domain ID according to application semantics

● Global variable: SET GLOBAL gtid_domain_id = 1;

● Config file: gtid-domain-id=1

● It can be specified by session

● Domain ID = Write Domain

● Server ID is the same as regular MySQL / MariaDB

● Dynamic global and session variable 10

Page 11: Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

© 2015, MariaDB.

MariaDB HA: Multi Source

● Ignore transactions with same GTID

● Global variable: SET GLOBAL gtid_ignore_duplicates = ON;

● Config file: gtid-ignore-duplicates = 1

● Create new replication streamCHANGE MASTER 's-102' TO MASTER_HOST='192.168.56.102', MASTER_USER='repl', MASTER_PASSWORD='repl', master_use_gtid=slave_pos;

START SLAVE 's-102';

11

Page 12: Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

© 2015, MariaDB.

MariaDB HA: Final Topology

● Typical 3 server setup

A B

C

Active Passive

s-102''

12

Page 13: Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

© 2015, MariaDB.

MariaDB HA: Final Topology

● Typical 3 server setup

A B

C

OFF LINE Active

s-102''

X

13

Page 14: Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

© 2015, MariaDB Corp.

● Clustered MariaDB nodescooperate to remain in sync.

● Synchronous replication withoptimistic locking delivers highavailability with little overhead.

● Fast failover because all nodes remains synchronized.

● Fully integrated binaries(NEW in 10.1)

MariaDB Availability: MariaDB Cluster

Load Balancingand Failover

Application / App Server

14

Page 15: Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

© 2015, MariaDB.

ProtocolAuthentic

ation

Mon

itor

Filter & Logging

Routing

MaxScaleCore

Routing

MariaDB HA: MaxScale 1.2

● Open source configurabledatabase proxy platform.

● Plugin Architecture

● HA Features● Read / Write splitter

● Binlog server

● Launchable scripts (NEW in 1.2)

● Supports MariaDB Cluster and replication● Mínimo de 3 nodos

15

Page 16: Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

© 2015, MariaDB.

MariaDB HA: Connector / J

● Java Connector for MySQL / MariaDB

● Support for failover in the connector (NEW in 1.2)

● New host parameters

● replication: Simple master-slave setups

● failover: MariaDB master-master / cluster setup

● Pros:

● Built into the application

● LGPL license

● Cons: Too simple for complex failover scenarios

16

Page 17: Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

© 2015, MariaDB.

MariaDB HA: Resources

● GTID documentationhttp://bit.ly/1yBbNUM

● Multi source replication documentationhttp://bit.ly/1u3Je1L

● Blogs● GTID: http://bit.ly/1qEMDAr

● Multi source: http://bit.ly/1rLtIaK

● HA Webinar https://goo.gl/Qnvy7b

17

Page 18: Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

© 2015, MariaDB.

MariaDB HA: MaxScale Resources

● Binary Log server● MariaDB blog: http://goo.gl/1QjjlJ

● Booking.com blog: http://goo.gl/yQ7524

● MaxScale blog roll● https://goo.gl/JJeKOB

18

Page 19: Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

© 2015, MariaDB.

MariaDB HA: Connector/J Resources

● Knowledge Base● About Connector/J: https://goo.gl/z8VI0S

● Download: https://goo.gl/d4lrOU

19

Page 20: Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

© 2015, MariaDB.

MariaDB HA: Solving the Puzzle

● MariaDB Services

● HA Consulting https://goo.gl/g5XGUS

● RDBA https://goo.gl/EJxGcf

●Credits

●Subscription

● Ask for an HA review

● http://bit.ly/1OwH0Ra

20

Page 21: Cómo resolver el desafío de alta disponibilidad de MariaDB y MySQL

© 2015, MariaDB.

Muchas gracias!Sesión de preguntas

Todos los asistentes van a recibir un link para acceder a la grabación de esta presentación.

Para mayor información sobre alta disponibilidad:

http://bit.ly/1OwH0Ra

Email: [email protected]

21