Mastering Galera Data Masters. Special Thanks To… 1010 NE 2 nd Ave Miami, FL 33132 305-735-1274 www.venturehive.co.

Slides:



Advertisements
Similar presentations
1 Chapter 10 Protecting Data Integrity in a Multiuser Environment.
Advertisements

2 Proprietary & Confidential What is Sharding Benefits of Sharding Alternatives of Sharding When to start Sharding Agenda.
© 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
CMU SCS Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications C. Faloutsos – A. Pavlo How to Scale a Database System.
Mastering Redis A Primer Data Masters. Special Thanks To… Planet Linux Caffe
Graph databases …the other end of the NoSQL spectrum. Material taken from NoSQL Distilled and Seven Databases in Seven Weeks.
Module 14: Scalability and High Availability. Overview Key high availability features available in Oracle and SQL Server Key scalability features available.
AGENDA Tools used in SQL Server 2000 Graphical BOL Enterprise Manager Service Manager CLI Query Analyzer OSQL BCP.
National Manager Database Services
Replication with MySQL 5.1 Ligaya Turmelle Senior Technical Support Engineer - MySQL
22-Aug-15 | 1 |1 | Help! I need more servers! What do I do? Scaling a PHP application.
DISTRIBUTED DATABASES AND DDBMS.  Understand the concept of “Distributed Data”  Describe various Distributed Data and DDBMS implementations  Explain.
SQL Server Replication By Karthick P.K Technical Lead, Microsoft SQL Server.
Scaling Data and Apps in the Cloud Data Masters. Special Thanks To… Rokk3r Labs Charles Irizarry & Charles Walter
IMS 4212: Distributed Databases 1 Dr. Lawrence West, Management Dept., University of Central Florida Distributed Databases Business needs.
1. When things go wrong: how to find SQL error Sveta Smirnova Principle Technical Support Engineer, Oracle.
Mastering Amazon RDS Data Masters. Special Thanks To… Miami Innovation Center for Entrepreneurship
Windows Azure Tour Benjamin Day Benjamin Day Consulting, Inc.
Presenter: John Tkaczewski Duration: 30 minutes February Webinar: The Basics of Remote Data Replication.
Mastering Neo4j A Graph Database Data Masters. Special Thanks To… Planet Linux Caffe
INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.
Module 10: Maintaining High-Availability. Overview Introduction to Availability Increasing Availability Using Failover Clustering Standby Servers and.
A Brief Documentation.  Provides basic information about connection, server, and client.
7. Replication & HA Objectives –Understand Replication and HA Contents –Standby server –Failover clustering –Virtual server –Cluster –Replication Practicals.
Preventive Replication in Database Cluster Esther Pacitti, Cedric Coulon, Patrick Valduriez, M. Tamer Özsu* LINA / INRIA – Atlas Group University of Nantes.
Caching Consistency and Concurrency Control Contact: Dingshan He
MySQL and GRID status Gabriele Carcassi 9 September 2002.
Alwayson Availability Groups
Mastering Redis Data Masters.
NOSQL DATABASE Not Only SQL DATABASE
MySQL Overview Jed Reynolds Write Your Questions on the Board! Landscape, Engines, HA, Performance Questions.
Data Visualization Data Masters. Special Thanks To… Rokk3r Labs Charles Irizarry & Charles Walter
DATABASE REPLICATION DISTRIBUTED DATABASE. O VERVIEW Replication : process of copying and maintaining database object, in multiple database that make.
Distributed DBMS, Query Processing and Optimization
Ch 12. Replication. Replication Place copies of data to a different location Use: Reduce locking conflict when multiple sites want to work on same set.
Migrating Data to SQL Azure Arunraj Chandrasekaran Twitter June 21, 2011.
IBM: Bluemix Data Masters. Special Thanks To… Rokk3r Labs Lorenzo de Leo & Lolo Evans
Mastering Cassandra Data Masters. Special Thanks To… Rokk3r Labs Charles Irizarry & Charles Walter
Data Warehousing in the Cloud Data Masters. Special Thanks To… Rokk3r Labs Lorenzo de Leo & Lolo Evans
Log Shipping, Mirroring, Replication and Clustering Which should I use? That depends on a few questions we must ask the user. We will go over these questions.
Distributed databases A brief introduction with emphasis on NoSQL databases Distributed databases1.
Putting Your Head in the Cloud Working with SQL Azure David Postlethwaite 19/09/2015David Postlethwaite.
High-Availability MySQL with DR:BD and Heartbeat: MTV Japan mobile services ©2008 MTV Networks Japan K.K.
All the things you need to know before setting up AlwaysOn Michael Steineke SQL & BI Solution Lead Enterprise Architect Concurrency, Inc.
Locks, Blocks & Isolation Oh My!. About Me Keith Tate Data Professional for over 14 Years MCITP in both DBA and Dev tracks
Read Dirty to Me: SQL Server Isolation Levels Wendy Pastrick Arrow IT Consulting.
MySQL HA An overview Kris Buytaert. ● Senior Linux and Open Source ● „Infrastructure Architect“ ● I don't remember when I started.
SQLintersection Locks, Blocks, and Deadlocks Oh My! Randy Knight Wednesday, 2:15-3:15.
Mastering Spark Data Masters. Special Thanks To…
1 Gaurav Kohli Xebia Breaking with DBMS and Dating with Relational Hbase.
Security Around MySQL Presented by: Danil Zburivsky/Singer Wang.
and Big Data Storage Systems
Database Services Katarzyna Dziedziniewicz-Wojcik On behalf of IT-DB.
ALWAYSON AVAILABILITY GROUPS
AlwaysOn Mirroring, Clustering
Data Virtualization Tutorial… Semijoin Optimization
A Technical Overview of Microsoft® SQL Server™ 2005 High Availability Beta 2 Matthew Stephen IT Pro Evangelist (SQL Server)
MySQL VS SQL Server Pat Wright & Kris Davey SQL Saturday #94
NOSQL databases and Big Data Storage Systems
What’s new in SQL Server 2016 Availability Groups
On transactions, and Atomic Operations
Example of a page header
Cloud Data Replication with SQL Data Sync
AlwaysOn Availability Groups
OurSQL = MySQL + Blockchain
Distributed Availability Groups
Using Distributed AGs for Your Migrations
Designing Database Solutions for SQL Server
Presentation transcript:

Mastering Galera Data Masters

Special Thanks To… 1010 NE 2 nd Ave Miami, FL

Our Sponsor! John Jadvani

 Short bio about me…  Andrew Simkovsky  15 years working with database technology  Oracle, MySQL/MariaDB, SQL Server, Postgres  Redis, MongoDB, CouchDB, Cassandra, Neo4j  Worked across many industries  Consulting, Retail, Telecommunications, Energy  Data, Marketing, Gaming, Health care

DBTekPro

Let’s Get Started!

Galera Cluster for MySQL  High availability (HA) and scaling solution for MySQL/MariaDB  A clustering solution that integrates with MySQL / MariaDB

Galera Cluster Concept MySQL/MariaDB Galera

Other HA and Scaling Solutions  Sharding  Master / Slave(s)  Master / Master  Master / Master plus Slaves

Sharding Application

Master / Slave(s) Application

Master / Slave(s) Application

Master / Master Application

Master / Master Plus Slaves Application

Basic Galera Concepts  Contains multiple nodes  Each node has a full copy of the data  Synchronous multi-master replication across all nodes  All changes to every node are replicated to all other nodes  Each node can be for reads and writes  All nodes can be accessed at the same time

Galera Concept Application

Quorum Commit  Don’t have to wait for all nodes to answer back for your changes  “Majority” rules  Committed nodes >= (N / 2 ) + 1  Minimum recommended number of nodes is 3

Split Brain Syndrome  Network partition between the nodes  Each node thinks its in charge  Both nodes keep taking traffic  Now both nodes have different contents  When nodes start talking to each other again, they are very confused

Split Brain Syndrome Application Data Center 1Data Center 2

Arbitrator Node  “Cheating” with 2 nodes  Acts as a third node  Doesn’t store any data  Aware of cluster state and replication status  Provides that third “commit” vote  Replication changes pass through it  Loss of direct connectivity between nodes can still be handled if arbitrator can talk to both

Arbitrator Node Application Data Center 1Data Center 2 Data Center 3

Some Other “Gotchas”  Be careful with non-deterministic functions like NOW(), CURTIME(), etc  DELETE commands on tables without a primary key are not supported  Direct writes to system tables (“mysql” database) are not replicated  Cluster enforces optimistic concurrency control  “I got here first, my transaction is good”  All other transactions locking the same row get deadlock error  Application should be configured to retry the transaction

Setup Overview

Stuff to install on each node  Operating system  MariaDB server  Galera  Percona XtraBackup

Setup Steps  On each node:  Set up configuration files  Start up MySQL  On first node: during startup, you tell it that it’s the first node.  The data it contains will become the “master” copy.  For each additional node that starts up, it will seek out one of its “neighbors”, and try to sync a copy of the data to itself  Source node is called the “donor”  After syncing the data, the node joins the cluster and becomes active

Database State Transfer  When starting up, each node needs a copy of the data  The copying of the data is called a “state transfer”  Will copy from existing nodes using one of these methods:  mysqldump  rsync  xtrabackup  For mysqldump and rsync, the donor is locked for writes during the entire copy process  Percona’s xtrabackup allows writes to happen on donor node during copy process

Live Demo!

Questions?

Thank You For Coming! Please rate this Meet Up: (or go there to join!) Check out my blog and forums: