MySQL InnoDB Cluster. New Feature in MySQL >= Sergej Kurakin

Similar documents
MySQL InnoDB Cluster. MySQL HA Made Easy! Miguel Araújo Senior Software Developer MySQL Middleware and Clients. FOSDEM 18 - February 04, 2018

MySQL HA Solutions Selecting the best approach to protect access to your data

MySQL High Availability

State of the Dolphin Developing new Apps in MySQL 8

Choosing a MySQL HA Solution Today. Choosing the best solution among a myriad of options

MySQL High Availability. Michael Messina Senior Managing Consultant, Rolta-AdvizeX /

MySQL Replication Options. Peter Zaitsev, CEO, Percona Moscow MySQL User Meetup Moscow,Russia

Introduction to MySQL InnoDB Cluster

MySQL High Availability

CO MySQL for Database Administrators

Various MySQL High Availability (HA) Solutions

Choosing a MySQL High Availability Solution. Marcos Albe, Percona Inc. Live Webinar June 2017

Group Replication: A Journey to the Group Communication Core. Alfranio Correia Principal Software Engineer

Choosing a MySQL HA Solution Today

MySQL Enterprise High Availability

Highly Available Database Architectures in AWS. Santa Clara, California April 23th 25th, 2018 Mike Benshoof, Technical Account Manager, Percona

MySQL for Database Administrators Ed 3.1

MySQL Multi-Site/Multi-Master Done Right

MySQL Cluster Ed 2. Duration: 4 Days

MySQL Group Replication & MySQL InnoDB Cluster

MySQL as a Document Store. Ted Wennmark

MySQL HA Solutions. Keeping it simple, kinda! By: Chris Schneider MySQL Architect Ning.com

MySQL Replication. Rick Golba and Stephane Combaudon April 15, 2015

The Care and Feeding of a MySQL Database for Linux Adminstrators. Dave Stokes MySQL Community Manager

MySQL Replication: What's New In MySQL 5.7 and MySQL 8. Luís Soares Software Development Director MySQL Replication

MySQL Group Replication in a nutshell

High Availability Solutions for the MySQL Database

MySQL for Database Administrators Ed 4

Using MySQL for Distributed Database Architectures

FromDual Annual Company Meeting

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 8

Percona XtraDB Cluster 5.7 Enhancements Performance, Security, and More

G a l e r a C l u s t e r Schema Upgrades

Future-Proofing MySQL for the Worldwide Data Revolution

Scaling Location Services with Kamailio Henning Westerholt, Marius Zbihlei Kamailio Project

Running MySQL on AWS. Michael Coburn Wednesday, April 15th, 2015

Everything You Need to Know About MySQL Group Replication

Maintaining a Microsoft SQL Server 2005 Database Course 2780: Three days; Instructor-Led

MySQL Cluster An Introduction

Agenda. What is Replication?

PhxSQL: A High-Availability & Strong-Consistency MySQL Cluster. Ming

High Availability and Disaster Recovery

High Availability and Automatic Failover in PostgreSQL using Open Source Solutions

MySQL Architecture Design Patterns for Performance, Scalability, and Availability

MariaDB 10.3 vs MySQL 8.0. Tyler Duzan, Product Manager Percona

C-JDBC Tutorial A quick start

MySQL High Availability Solutions. Alex Poritskiy Percona

High Noon at AWS. ~ Amazon MySQL RDS versus Tungsten Clustering running MySQL on AWS EC2

Percona XtraDB Cluster

HA for OpenStack: Connecting the dots

<Insert Picture Here>

MySQL InnoDB Cluster & Group Replication in a Nutshell: Hands-On Tutorial

Avaya Aura TM System Platform R6.0 Release Notes Issue 2.0

NoSQL + SQL = MySQL. Nicolas De Rico Principal Solutions Architect

Mysql Cluster Could Not Acquire Global Schema Lock

Multi-Data Center MySQL with Continuent Tungsten

MySQL Replication Advanced Features In 20 minutes

MySQL Group Replication. Bogdan Kecman MySQL Principal Technical Engineer

Become a MongoDB Replica Set Expert in Under 5 Minutes:

IBM C IBM Security Guardium V10.0 Administration.

AWS Administration. Suggested Pre-requisites Basic IT Knowledge

MySQL Port Reference

Copyright 2013

SQL Azure. Abhay Parekh Microsoft Corporation

MySQL Architecture Options:

<Insert Picture Here> MySQL Web Reference Architectures Building Massively Scalable Web Infrastructure

MySQL Database Administrator Training NIIT, Gurgaon India 31 August-10 September 2015

MySQL Replication Update

Avaya Aura TM System Platform R6.0.1 Service Pack Release Notes Issue 1.4

MySQL High available by design

ZENworks Mobile Workspace High Availability Environments. September 2017

ITS. MySQL for Database Administrators (40 Hours) (Exam code 1z0-883) (OCP My SQL DBA)

HA solution with PXC-5.7 with ProxySQL. Ramesh Sivaraman Krunal Bauskar

Percona XtraDB Cluster powered by Galera. Peter Zaitsev CEO, Percona Slide Credits: Vadim Tkachenko Percona University, Washington,DC Sep 12,2013

Migrating to Aurora MySQL and Monitoring with PMM. Percona Technical Webinars August 1, 2018

What is the Future of PostgreSQL?

ProxySQL - GTID Consistent Reads. Adaptive query routing based on GTID tracking

Mix n Match Async and Group Replication for Advanced Replication Setups. Pedro Gomes Software Engineer

Using the MySQL Document Store

Enterprise Open Source Databases

Document Sub Title. Yotpo. Technical Overview 07/18/ Yotpo

MySQL HA vs. HA. DOAG Konferenz 2016, Nürnberg. Oli Sennhauser. Senior MySQL Consultant, FromDual GmbH.

Mysql Manual Error Log Location Windows Server

MQ High Availability and Disaster Recovery Implementation scenarios

Architecting Splunk For High Availability And Disaster Recovery

Oracle RAC Course Content

Percona XtraDB Cluster ProxySQL. For your high availability and clustering needs

A Guide to Architecting the Active/Active Data Center

The Actifio Glossary A B C D E F G H I-K L M N-O P-Q R S T U V W-Z

1Z Oracle. MySQL 5 Database Administrator Certified Professional Part I

CONTENTS. Cisco Internet Streamer CDS 3.0 Software Configuration Guide iii OL CHAPTER 1 Product Overview 1-1

Clustering for the Masses A Gentle Introduction to Tungsten for MySQL. Robert Hodges CTO, Continuent, Inc.

Binlog Servers at Booking.com. Jean-François Gagné jeanfrancois DOT gagne AT booking.com

DRBD 9. Lars Ellenberg. Linux Storage Replication. LINBIT HA Solutions GmbH Vienna, Austria

What s New in MySQL and MongoDB Ecosystem Year 2017

Jailbreaking MySQL Replication Featuring Tungsten Replicator. Robert Hodges, CEO, Continuent

Distributed Data Infrastructures, Fall 2017, Chapter 2. Jussi Kangasharju

Lessons from database failures

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Symbols INDEX > 12-14

Transcription:

MySQL InnoDB Cluster New Feature in MySQL >= 5.7.17 Sergej Kurakin

Sergej Kurakin Age: 36 Company: NFQ Technologies Position: Software Engineer

Problem

What if your database server fails?

Reboot? Accidental shutdown?

Kernel panic? Misconfiguration?

Network failure? Hardware failure?

And this is the ONLY ONE database server that exists for your project.

Visitors, clients and business can t wait until someone eventually gets to the Data Center and solves all issues.

Of course, there are solutions already created to automate failover and some of them are quite old and effective!

Master-Slave Replication with manual or automatic failover. Linux High Availability Cluster with DRBD and MySQL. MySQL NDB Cluster. Oracle MySQL Cloud Service. MySQL with Solaris Cluster. Galera Cluster for MySQL. Amazon Relational Database Service.

But we will talk about the new one!

MySQL InnoDB Cluster

MySQL InnoDB Cluster was introduced in version 5.7.17 on December 12, 2016.

Actually, MySQL Group Replication was introduced in 5.7.17 release and made MySQL InnoDB Cluster possible.

MySQL InnoDB Cluster is a collection of products that work together to provide a complete High Availability solution for MySQL.

Products used to build InnoDB Cluster MySQL Shell >= 1.0.9 MySQL Router >= 2.1.3 MySQL Server >= 5.7.17

Image from https://dev.mysql.com/doc/refman/5.7/en/mysql-innodb-cluster-introduction.html

MySQL Shell

What is MySQL Shell? New advanced command-line client for the MySQL Server. Uses the X DevAPI to communicate with a MySQL Server running the X Plugin. Supports SQL, JavaScript and Python languages. Sessions: XSession, Node Session, Classic Session. Allows Interactive and Batch Code Execution.

MySQL Shell Roles Configure MySQL instances for Cluster. Verify MySQL instances are valid for InnoDB Cluster membership. Create InnoDB Cluster. Check InnoDB Cluster Status. Manage InnoDB Cluster. InnoDB Cluster recovery.

MySQL Router

What is MySQL Router? Lightweight middleware that provides transparent routing between your application and back-end MySQL Servers.

MySQL Router Roles Aware of the InnoDB Cluster topology. Know which MySQL instance is the PRIMARY. Acts as a proxy to hide the multiple MySQL instances. Handles failover instead of Client.

MySQL Server

MySQL Server Roles Provides the MySQL Group Replication mechanism to allow data to be replicated within the cluster, with built-in failover.

Image from https://dev.mysql.com/doc/refman/5.7/en/mysql-innodb-cluster-introduction.html

More about MySQL InnoDB Cluster

MySQL InnoDB Cluster Modes Single-primary mode. Multiple-primaries mode - advanced mode.

Important Limitations and Requirements At least 3 and not more than 9 servers required for Cluster. Use odd number. All tables must be of InnoDB type. All tables must have PRIMARY keys. Only IPv4 network supported. Network performance is a must (low latency, high bandwidth).

Supershort How To

Cluster Creation Steps Set up at least 3 identical MySQL servers, but not more than 9. Add cluster management user on each server. Configure MySQL servers with MySQL Shell for Cluster for the first time. Create MySQL Cluster using MySQL Shell. Configure MySQL servers with MySQL Shell for Cluster for the second time. Set up MySQL Routers on the same servers where MySQL Clients are located. Configure your Clients to use MySQL Routers.

Cluster Creation (internals shortly) The InnoDB Cluster Metadata Schema is created. The new InnoDB cluster information, including the specified name and password, is inserted into the InnoDB cluster Metadata. The seed instance is added to the InnoDB cluster. The seed instance information is inserted into the InnoDB cluster Metadata.

Connecting to MySQL InnoDB Cluster If your Clients need to work with InnoDB Cluster, they must be connected to MySQL Router. Default Read/Write port: 6446 - connects to the PRIMARY. Default Read/Only port: 6447 - connects to one of the SLAVES. Only Classic MySQL protocol supported.

The gotchas!

If PRIMARY Node Fails... If PRIMARY node fails MySQL Router drops all connections from Clients until new PRIMARY elected. Prepare to handle many MySQL server has gone away errors for reads and writes.

Cluster falls apart if all Nodes were down If all your servers eventually go down in same time your Cluster falls apart and needs to be reconfigured. This is called Complete Outage.

Avoid Large Transactions Large transactions that cannot be copied between group members over the network within a 5 second window can cause failures in the group communication.

MySQL Router Gotchas MySQL Router sometimes lags with Cluster updates, especially after recovery. MySQL Router has weird limit: 500 connections per instance.

MySQL Shell Gotchas To set up cluster node must be installed on the same host. During setup must be able to modify MySQL configuration file. No.deb packages for newer distributions. Version 1.0.10 has a bug with cluster management user permissions during setup. No code completion. Lack of good documentation. Hangs on lost connection.

Demo!

What We Will Try in the Demo Restore Cluster from Complete Outage Kill PRIMARY node during reads. Restore killed node. Kill PRIMARY node during writes. Restore killed node.

What about Production?

I have no experience with MySQL InnoDB Cluster in production.

Some notes for Production Redundant network. Redundant power. Learn to troubleshoot before going live. Learn how to recover from different failures before going live. Test failover well before going live. Big data set might be a problem for initial sync.

Would I run it in Production? But before... Yes!

Before going to Production Before going to Production I would like to try this technology on something small scale and not so vital, as someone s very important and highly loaded project. Yes, I would need some practice and troubleshooting experience too.

Maybe someone in auditorium already has experience with MySQL InnoDB Cluster and ready to say a word?

Back to the Problem

Would it solve our problem? Yes, but with additional cost. You need two more spare servers with MySQL installed. You need to monitor and maintain MySQL InnoDB Cluster.

Discussion Sergej Kurakin Work @mail: sergej.kurakin@nfq.lt Personal @mail: sergej@kurakin.info https://www.linkedin.com/in/sergejkurakin