This document provides an introduction to MySQL InnoDB Cluster, which is MySQL's solution for high availability and scaling. It discusses how Group Replication, the heart of MySQL InnoDB Cluster, allows data to be written simultaneously across cluster nodes while maintaining consistency through techniques like conflict detection and resolution. The document also explains how Group Replication provides automatic recovery from failures and makes high availability easy for users to setup and manage.
The document provides an overview of using MySQL as a document store by:
1) Supporting the JSON data type
2) Enabling CRUD operations on JSON documents
3) Developing an X-Plugin extension and X-Protocol to interface with MySQL like a NoSQL database
4) Providing a MySQL Shell interface to simplify migration of data from MongoDB to MySQL and interacting with JSON documents
The document discusses MySQL InnoDB Cluster, which provides high availability and scaling features for MySQL. It uses Group Replication under the hood, which allows data to be written simultaneously across cluster nodes while maintaining consistency. By default, MySQL InnoDB Cluster runs in Single Primary Mode, where one node acts as the primary/writable node and others act as hot standbys through an automated leader election process.
MySQL InnoDB Cluster and Group Replication in a NutshellFrederic Descamps
This document outlines the agenda and steps for a hands-on tutorial on MySQL InnoDB Cluster and Group Replication. The agenda includes preparing the workstation by setting up virtual machines, an overview of MySQL InnoDB Cluster and Group Replication, migrating from a master-slave topology to Group Replication, monitoring Group Replication, and application interaction with Group Replication. The first lab demonstrates the current master-slave setup. The migration plan involves installing MySQL InnoDB Cluster on a new server, restoring a backup, setting up asynchronous replication on the new server, adding it to the Group Replication group, pointing the application to a new node, and stopping asynchronous replication after catch up.
MySQL Document Store - when SQL & NoSQL live together... in peace!Frederic Descamps
Frédéric Descamps gave a demonstration of MySQL Document Store, showing how it allows both SQL and NoSQL functionality. He migrated sample data from MongoDB to MySQL Document Store and performed queries and CRUD operations. The conclusion is that MySQL Document Store provides the best of both worlds by combining schemaless and flexible data with ACID compliance, SQL capabilities, and data integrity.
The document discusses MySQL Group Replication, which is a plugin that provides multi-master replication capability for MySQL. It allows data to be replicated between multiple MySQL servers so that they can stay in sync. The replication works by having each server send transaction writesets to other servers through a group communication system, and then each server certifies and applies the changes locally in an asynchronous manner.
Inexpensive Datamasking for MySQL with ProxySQL - data anonymization for deve...Frederic Descamps
The document discusses using ProxySQL as a solution for anonymizing data in MySQL databases. It describes how ProxySQL can mask specific columns by replacing values with partial values and characters like X. Rules are created in ProxySQL to match SQL statements and regular expressions are used to modify the statements by replacing column values with the masked values. Examples of SQL statements and the masking applied are also provided.
These are the *updated* slides (InnoDB clusters and MySQL Enterprise Monitor 3.4 are now GA) from the following webinar, which you can now watch on demand:
https://www.mysql.com/news-and-events/web-seminars/why-mysql-high-availability-matters/
-----------------------------------------------------
MySQL high availability matters because your data matters. If your database goes down, whether due to human error, catastrophic network failure, or planned maintenance, the accessibility and accuracy of your data can be compromised with disastrous results. We'll examine the critical elements of a high availability solution, including:
- Data redundancy
- Data consistency
- Automatic fault detection and resolution
- No single point of failure
And how you can achieve these things more easily than ever before using MySQL's new native HA solution.
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB ClusterContinuent
Oracle’s InnoDB Cluster vs. Continuent Tungsten Clusters for MySQL
Building a Geo-Distributed, Multi-Region and Highly Available MySQL Cloud Back-End
This is the fifth of our High Noon series covering MySQL clustering solutions for high availability (HA), disaster recovery (DR), and geographic distribution.
InnoDB Cluster uses MySQL’s group replication to handle the replication. It’s also known as semi-synchronous replication. Learn about this and more in this webinar!
You may use Tungsten Clustering with native MySQL, MariaDB or Percona Server for MySQL in GCP, AWS, Azure, and/or on-premises data centers for better technological capabilities, control, and flexibility. But learn about the pros and cons!
AGENDA
- Goals for the High Noon Webinar Series
- High Noon Series: Tungsten Clustering vs Others
- Oracle InnoDB Cluster
- Key Characteristics
- Certification-based Replication
- InnoDB Cluster Multi-Site Requirements
- Limitations Using InnoDB Cluster
- How to do better MySQL HA / DR / Geo-Distribution?
- InnoDB Cluster vs Tungsten Clustering
- About Continuent & Its Solutions
PRESENTER
Matthew Lang - Customer Success Director – Americas, Continuent - has over 25 years of experience in database administration, database programming, and system architecture, including the creation of a database replication product that is still in use today. He has designed highly available, scaleable systems that have allowed startups to quickly become enterprise organizations, utilizing a variety of technologies including open source projects, virtualization and cloud.
The document provides an overview of MySQL InnoDB Cluster and demonstrates how to set up a basic cluster. Key points include:
- MySQL InnoDB Cluster uses Group Replication to provide high availability, fault tolerance and automated recovery.
- The demo deploys 3 sandbox MySQL instances and uses the MySQL Shell to create an InnoDB cluster spanning the instances.
- By default, the cluster operates in single-primary mode, where one node acts as the primary and accepts writes. Multi-primary mode is also demonstrated.
- Status variables and queries are shown to identify the current primary node.
MySQL InnoDB cluster provides a complete high availability solution for MySQL.
MySQL Shell includes AdminAPI which enables you to easily configure and administer a group of at least three MySQL server instances to function as an InnoDB cluster.
Each MySQL server instance runs MySQL Group Replication, which provides the mechanism to replicate data within InnoDB clusters, with built-in failover.
MySQL Router can automatically configure itself based on the cluster you deploy, connecting client applications transparently to the server instances.
This document discusses InnoDB tablespace encryption in MySQL. It begins with prerequisites for encryption like having MySQL 5.7 installed and the keyring plugin configured. It then covers how to encrypt existing and new tables. The architecture uses a two-tier encryption model with a master key and tablespace keys. Key rotation only re-encrypts tablespace keys. Exporting encrypted tables requires additional files. Replication requires different keyring files on master and slave. MySQL Enterprise Edition supports transparent data encryption using the Oracle Key Vault for strong key protection and management.
DataOps barcelona - MySQL 8.0 document store: NoSQL with all the benefits of ...Frederic Descamps
MySQL 8.0 introduces a document store functionality with JSON documents. It provides the flexibility of a NoSQL document store while retaining the transactional capabilities and reliability of MySQL. Developers benefit from the schemaless nature and simpler APIs of document models, while operations maintain performance management, backup/restore, and tooling benefits of MySQL. The solution aims to provide both relational and document functionality on a single stable platform.
FOSDEM MySQL & Friends Devroom, February 2018 MySQL Point-in-Time Recovery l...Frederic Descamps
The document describes how to perform point-in-time recovery (PITR) with MySQL to restore data to a past state. It requires binary logs to be enabled and backups kept along with binlogs. The procedure involves restoring the last backup, finding the binlog position, and replaying binlog events from that position up to the desired point in time. An example demonstrates restoring data after an accidental update, identifying the binlog position to recover to using SHOW BINLOG EVENTS.
This document provides an overview of troubleshooting replication in MySQL and MariaDB databases. It discusses typical errors seen with the slave IO thread and slave SQL thread, such as replication stopping, the slave lagging behind the master, and the master increasing in resource usage. It also covers replication concepts like the master-slave architecture, binary logging formats, global transaction identifiers, and tools for monitoring replication like SHOW SLAVE STATUS and Performance Schema.
The document discusses proposed changes to MySQL Server 8.0 and replication defaults. Some key areas discussed include changing the default character set to UTF8MB4, turning on the event scheduler by default, increasing some session buffer sizes, enabling security defaults, and enabling replication features like binary logging and GTIDs by default. The document seeks feedback from users on the proposed changes.
Every website wants to become successful. Few websites however undertake the basic and fundamental steps to build a rock solid foundation to ensure a scalable
Upgrading MySQL databases do not come without risk. There is no guarantee that no problems will happen if you move to a new major MySQL version.
Should we just upgrade and rollback immediately if problems occur? But what if these problems only happen a few days after migrating to this new version?
You might have a database environment that is risk-adverse, where you really have to be sure that this new MySQL version will handle the workload properly.
Examples:
- Both MySQL 5.6 and 5.7 have a lot of changes in the MySQL Optimizer. It is expected that this improves performance of my queries, but is it really the case? What if there is a performance regression? How will this affect my database performance?
- Also, there are a lot of incompatible changes which are documented in the release notes, how do I know if I'm affected by this in my workload? It's a lot to read..
- Can I go immediately from MySQL 5.5 to 5.7 and skip MySQL 5.6 even though the MySQL documentation states that this is not supported?
- Many companies have staging environments, but is there a QA team and do they really test all functionality, under a similar workload?
This presentation will show you a process, using open source tools, of these types of migrations with a focus on assessing risk and fixing any problems you might run into prior to the migration.
This process can then be used for various changes:
- MySQL upgrades for major version upgrades
- Switching storage engines
- Changing hardware architecture
Additionally, we will describe ways to do the actual migration and rollback with the least amount of downtime.
MHA (MySQL High Availability): Getting started & moving past quirksColin Charles
MHA (Master High Availability Manager) is a tool for automating MySQL master failover and slave promotion with minimal downtime. It consists of Perl scripts that monitor a replication topology and automatically switch a slave to a master if the current master fails. When a failure is detected, MHA identifies the most up-to-date slave and applies any missing binary logs to make it the new master. It then changes the slaves to replicate from the new master. MHA requires installing node packages on all servers and a manager package to coordinate monitoring and failover.
MySQL High Availability with Group ReplicationNuno Carvalho
MySQL Group Replication is a multi-master update everywhere replication plugin that provides high availability. It removes the need for handling server failover, provides fault tolerance, and automates group reconfiguration. Transactions are replicated to all group members, with conflicts detected and resolved using a first committer wins rule. Failed members automatically rejoin the group and synchronize with the others transparently. Group Replication uses the standard MySQL and InnoDB architecture, so existing users will feel familiar. It also supports features like auto-increment handling, GTIDs, secure connections, and a new single primary mode.
Online MySQL Backups with Percona XtraBackupKenny Gryp
Percona XtraBackup is a free, open source, complete online backup solution for all versions of Percona Server, MySQL® and MariaDB®.
Percona XtraBackup provides:
* Fast and reliable backups
* Uninterrupted transaction processing during backups
* Savings on disk space and network bandwidth with better compression
* Automatic backup verification
* Higher uptime due to faster restore time
This talk will discuss the various different features of Percona XtraBackup, including:
* Full & Incremental Backups
* Compression, Streaming & Encryption of Backups
* Backing Up To The Cloud (Swift).
* Percona XtraDB Cluster / Galera Cluster.
* Percona Server Specific features
High Availability Using MySQL Group ReplicationOSSCube
MySQL Group Replication is a recent MySQL plugin that brings together group communication techniques and database replication, providing both a high availability and a multi-master update everywhere replication solution.
The PPT provide provide a broad overview of MySQL Group Replication plugin, what it can achieve and how it helps keep your MySQL databases highly available and your business up and running, without fail.
We all have tasks from time to time for bulk-loading external data into MySQL. What's the best way of doing this? That's the task I faced recently when I was asked to help benchmark a multi-terrabyte database. We had to find the most efficient method to reload test data repeatedly without taking days to do it each time. In my presentation, I'll show you several alternative methods for bulk data loading, and describe the practical steps to use them efficiently. I'll cover SQL scripts, the mysqlimport tool, MySQL Workbench import, the CSV storage engine, and the Memcached API. I'll also give MySQL tuning tips for data loading, and how to use multi-threaded clients.
This document provides an overview of advanced MySQL replication techniques. It begins with an introduction to replication basics like principles, setup, and monitoring. It then discusses challenges with replication including master switchovers during failures and slaves falling behind. The document outlines various replication power techniques and features that can help address these issues like row-based and semi-synchronous replication. It also covers tools for replication and techniques for replication outside of the traditional setup.
MySQL Replication Performance Tuning for Fun and Profit!Vitor Oliveira
MySQL Replication, in addition to bringing high-availability, is the foundation to build high-performance MySQL database systems. Using read scale-out and sharding one can design systems that go from the capacity of a single server to supporting the largest internet sites. But to design and operate high-performance, efficient, manageable and reliable deployments requires knowing the intricacies of the underlying technologies.
This session will provide insights on the main factors that affect the performance of Asynchronous Replication and Group Replication, and how to configure them to make the most out of the underlying computing system. It will also show the latest developments in MySQL 5.7 and 8.0, in areas spanning from group communication to the multi-threaded slave applier, and how effective they are in helping meet the performance requirements in terms of throughput, latency and durability to support the most demanding workload types.
MySQL InnoDB Cluster - A complete High Availability solution for MySQLOlivier DASINI
MySQL InnoDB Cluster provides a complete high availability solution for MySQL. It uses MySQL Group Replication, which allows for multiple read-write replicas of a database to exist with synchronous replication. MySQL InnoDB Cluster also includes MySQL Shell for setup, management and orchestration of the cluster, and MySQL Router for intelligent connection routing. It allows databases to scale out writes across replicas in a fault-tolerant and self-healing manner.
This document discusses troubleshooting an error of "Too many open files" when running MySQL. It describes how the open_files_limit parameter was not taking effect due to MySQL setting the file descriptor limit internally based on other factors like max_connections. Through debugging with GDB and tracing the code, it was found that MySQL was calling setrlimit() to set the limit based on the lower of the configured open_files_limit or the OS file limit. The solution involved configuring the ulimit directly via mysqld_safe to set the limit before MySQL started.
MySQL Group Replicatio in a nutshell - MySQL InnoDB ClusterFrederic Descamps
Group Replication is a plugin that provides multi-master replication for MySQL. It allows transactions to be executed on any node and replicated in a synchronous manner to all other nodes. The changes are delivered in total order to each node using GTIDs to ensure strong consistency across the cluster. Certification and application of the changes occurs asynchronously on each node after the writeset has been synchronously delivered.
DataOps Barcelona - MySQL HA so easy... that's insane !Frederic Descamps
1. MySQL 8.0 InnoDB Cluster is a new high availability and scaling solution for MySQL that makes setup easy.
2. It uses Group Replication under the hood to allow writing to all nodes simultaneously while maintaining consistency.
3. Key components include MySQL Router for routing and load balancing, and MySQL Shell for administration.
MySQL Innovation Day Chicago - MySQL HA So Easy : That's insane !!Frederic Descamps
The document is a safe harbor statement outlining Oracle's general product direction for informational purposes only. It states that Oracle has sole discretion over developing and releasing features and that nothing in the document should be relied upon for purchasing decisions. It also contains copyright information.
GraphPipe - Blazingly Fast Machine Learning Inference by Vish AbramsOracle Developers
GraphPipe is an open source protocol and collection of software designed to simplify machine learning model deployment and decouple it fromframework-specific model implementations.
Oracle Open World 2018 / Code One : MySQL 8.0 High Availability with MySQL I...Frederic Descamps
The document discusses migrating from a master-slave MySQL configuration to a MySQL InnoDB Cluster. The plan involves: 1) Taking a hot backup of the current slave and restoring it on a new server; 2) Configuring the new server as an asynchronous slave; 3) Creating an initial InnoDB Cluster with the new server; 4) Stopping replication on the original slave and joining it to the cluster; 5) Optionally adding the original master to the cluster to enable high availability.
20190615 hkos-mysql-troubleshootingandperformancev2Ivan Ma
MySQL Troubleshooting in Hong Kong Open Source Conference 2019 - how to use sys.diagnostics(...) and using the dimitri (http://dimitrik.free.fr/) Tools for performance analysis.
Overpowered Kubernetes: CI/CD for K8s on Enterprise IaaSJ On The Beach
The document discusses Oracle's container native platform for running Kubernetes on Oracle Cloud Infrastructure (OCI). It provides a fully managed Kubernetes service called OCI Container Engine for Kubernetes (OKE) along with an integrated container registry (OCIR). The document demonstrates creating a Kubernetes cluster on OKE and deploying a containerized application using a continuous integration/delivery pipeline to build, test and deploy containers. It highlights the capabilities for continuous integration, container image management and serverless functions that Oracle provides along with the infrastructure capabilities of OCI such as high performance compute and storage resources.
Robust easy affordable disaster recovery for MySQL DataOracleMySQL
Priscila Galvao, a MySQL Solutions Engineer, presented on disaster recovery options for MySQL data. The presentation discussed how backup is the first step but not sufficient on its own for protection against disasters. It introduced disaster recovery plans and options like cloud backup and disaster recovery to Oracle Cloud's MySQL service in active-standby or active-active configurations. Benefits highlighted included conserving resources, faster response times, flexibility, security, and support.
EMEA Oracle User Group Leaders Summit in Valencia 2017
Evolution is inevitable and this sllide deck illustrates how MySQL evolves with the requests of the customers and the Community. What are the problem they face and what are the solutions that we developed to help our user base.
MySQL 8 High Availability with InnoDB ClustersMiguel Araújo
MySQL’s InnoDB cluster provides a high-level, easy-to-use solution for MySQL high availability. Combining MySQL Group Replication with MySQL Router and the MySQL Shell into an integrated solution, InnoDB clusters offer easy setup and management of MySQL instances into a fault-tolerant database service. In this session learn how to set up a basic InnoDB cluster, integrate it with applications, and recognize and react to common failure scenarios that would otherwise lead to a database outage.
- Workshop presentation
Everything You Need to Know About MySQL Group ReplicationNuno Carvalho
MySQL Group Replication is a new plugin that implements an exciting extension to the proven and long standing MySQL Replication technology. It leverages advanced distributed protocols to ultimately provide to the end user features such as data replication, high availability, split brain protection and automation.
It can be deployed in single-primary mode (default), in which primary fail-over is handled gracefully and automatically, or in multi-master mode, in which row level conflicts are detected and handled automatically as well. Regardless of the deployment mode, the end result is that this new addition provides a consistent and dependable replicated state machine, thus effectively enabling a fault-tolerant MySQL database service.
At the end of the presentation, you will be able to understand how it works, the use cases it address, its limitations and also its roadmap ahead. Moreover, you will get to know how it fits in the overall high availability roadmap at MySQL.
This document discusses deploying MySQL InnoDB Cluster for high availability. It provides an overview of MySQL InnoDB Cluster and compares it to other MySQL and Oracle high availability solutions. It then covers topics like MySQL InnoDB Cluster architecture, example deployments, configuration settings for replication, failover consistency, network reliability and adding replicas. Finally, it discusses MySQL Router configuration and using MySQL Shell and MySQL Enterprise Backup for management and recovery.
MySQL Community Meetup in China : Innovation driven by the CommunityFrederic Descamps
The document discusses innovations and new features in MySQL from versions 5.7 to 8.0. Key points include:
- MySQL 5.7 introduced performance improvements, security enhancements, and JSON support. MySQL InnoDB Cluster provided out-of-the-box high availability.
- MySQL 8.0 focuses on boosting developer productivity with features like common table expressions, window functions, and improved handling of hot rows. It also makes scaling easier through improved observability and parallel replication.
- The vision is to deliver a fully-integrated solution with relational and document storage, built-in high availability, and scale-out capabilities through sharding and replication. This will be achieved in steps, with Group Re
The document discusses NoSQL APIs in MySQL. It provides an overview of the memcached caching system and the history of the HandlerSocket protocol. It then describes the NoSQL interface introduced in MySQL 5.6, which allows for memcached-style operations on MySQL data. It notes that MySQL 5.7 further improved the performance and scalability of this interface.
The document provides an overview of MySQL Group Replication, which is a multi-master update anywhere replication plugin for MySQL that provides built-in automatic distributed recovery, conflict detection, and group membership. It allows for active/active update anywhere setups, automates group reconfiguration, and provides a highly available distributed database service. The document discusses the theory behind MySQL Group Replication, provides examples of how to use it, and concludes by discussing its benefits and future releases.
The document discusses new features in MySQL 8.0, including a MySQL document store for working with JSON documents, improved JSON support with new functions, full Unicode support, and a transactional native data dictionary. Performance tests showed MySQL 8.0 was 40% faster than MySQL 5.7 for a read-only OLTP workload using utf8mb4. Additional features included in MySQL 8.0 are common table expressions, window functions, and configuration changes to make MySQL more cloud friendly.
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0Olivier DASINI
Upgrading is a common procedure, as you pick up bug fixes within the same MySQL release series or significant features between major MySQL releases. You perform this procedure first on some test systems to make sure everything works smoothly, and then on the production systems.
Have you been wanting to add some smarts to your castle, but you're concerned about getting locked into an expensive closed system? Getting started doesn't need to be expensive and it definitely doesn't need to be closed. Grab a Raspberry Pi and let's set up openHAB, an open source solution for empowering your castle (smart home.)
I will cover some of the reasons you may want to smarten up your home and talk about some of the devices currently available. I'll discuss some of the features and capabilities of openHAB, demonstrate installing it on a Raspberry Pi and walk through the built-in control interface. If you're like me, you will want to persist a lot of the data that passes through openHAB, so I will cover some of the existing persistence options.
Having a castle is good, but a cloud castle is awesome. I will demonstrate how to connect openHAB to a cloud database using a restful interface. I will create the data structures and interface then modify my installation of openHAB to take advantage of the new data store.
I will wrap up the session with a discussion of the openHAB project and go over a few ways that we can all contribute.
You'll leave this session with the tools to track the data in your own IoT projects and hopefully some new ideas.
The 12c optimizer has a vast array of improvements, but of course, functionality changes means that your SQL plans might also change when you upgrade. This slidedeck covers what has changed, and how to ensure better more stable performance when you upgrade.
Similar to MySQL innodb cluster and Group Replication in a nutshell - hands-on tutorial with MySQL Enterprise Backup (20)
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...Frederic Descamps
Découvrez un nouveau monde où l'on peut gérer ses données sans la moindre ligne de SQL.
MySQL Document Store utilise le nouveau protocol MySQL X, qui est également présent avec MySQL Database Service sur OCI, et permet aux développeurs d'écrire du code simple et efficace.
Mais attention, si nécessaire, MySQL Document Store peut également traiter les document JSON comme s'ils étaient des tables relationnelles et permettre des requêtes très poussées...
This document discusses how MySQL indexes and histograms can speed up queries. It begins with an introduction to the presenter and topic. The goal of reducing query response time is discussed. Methods for identifying inefficient queries are covered, including using the sys schema. The role of the MySQL optimizer in evaluating query plans is then explained. Different types of indexes that can be used to optimize queries are also outlined.
RivieraJUG - MySQL 8.0 - What's new for developers.pdfFrederic Descamps
This document summarizes Frédéric Descamps' presentation on new features in MySQL 8.0 for developers. It introduces Descamps and covers several new features in MySQL 8.0, including the new volcano iterator and optimizer refactoring, EXPLAIN ANALYZE for analyzing query performance, hash joins replacing block nested loops, common table expressions, lateral derived tables, window functions, JSON functions, table value constructors, functional indexes, invisible indexes, check constraints, expressions as default values, lock modes like NOWAIT and SKIP LOCKED, and support for generated invisible columns as primary keys.
This document provides an overview of new features and enhancements in MySQL 8.0 over the last 18 months, from versions 8.0.23 to 8.0.30. It discusses improvements to replication, Group Replication, InnoDB, and primary keys. Some key changes include a new InnoDB redo log architecture, support for disabling the redo log at runtime, parallel index builds, and the ability to add an invisible auto-increment primary key column to tables without a primary key. The document is presented by Frédéric Descamps at the MySQL User Group NL.
Frédéric Descamps presented on the state of MySQL in 2022. Some key points included:
- MySQL 8.0.29 was the latest release with improvements like IF NOT EXISTS for DDL statements.
- MySQL remains the most popular open source database according to surveys.
- MySQL HeatWave on OCI provides high performance for analytics workloads compared to other cloud offerings.
- The MySQL Operator for Kubernetes makes it easier to deploy and manage MySQL on Kubernetes.
- Upcoming certifications for MySQL 8.0 DBA and Developer were announced.
Percona Live 2022 - MySQL Shell for Visual Studio CodeFrederic Descamps
The document discusses MySQL Shell for Visual Studio Code, a new client for developers and DBAs. It provides an overview of the key features and components of the MySQL Shell extension for VS Code, including how to install and use the SQL Notebook editor, MySQL Shell Console, and its integration with Oracle Cloud Infrastructure. The document also covers how MySQL Shell plugins can still be used with the VS Code extension by copying plugins to the appropriate directory.
Percona Live 2022 - The Evolution of a MySQL Database SystemFrederic Descamps
From a single MySQL instance to multi-site high availability, this is what you will find out in this presentation. You will learn how to make this transition and which solutions best suit changing business requirements (RPO, RTO). Recently, MySQL has extended the possibilities for easy deployment of architecture with integrated tools. Come and discover these open source solutions that are part of MySQL.
In this tutorial, we cover the different deployment possibilities of the MySQL architecture depending on the business requirements for the data. We also deploy some architecture and see how to evolve to the next one.
The tutorial covers the new MySQL Solutions like InnoDB ReplicaSet, InnoDB Cluster, and InnoDB ClusterSet.
LinuxFest Northwest 2022 - The Evolution of a MySQL Database SystemFrederic Descamps
At the beginning of a project, the database is just a single MySQL instance (maybe not even running on its own hardware)... but with the evolution of the business requirements, the database must change to also meet the new targets of data loss and uptime. During this session we will follow the journey of a single MySQL server from the simple instance to a High Available Architecture with multi-site Disaster Recovery. We will discover easy manageable native solutions like MySQL InnoDB ReplicaSet, MySQL InnoDB Cluster and MySQL InnoDB ClusterSet. The session is also illustrated with commands and examples.
Open Source 101 2022 - MySQL Indexes and HistogramsFrederic Descamps
Nobody complains that the database is too fast. But when things slow down, the complaints come quickly. The two most popular approaches to speeding up queries are indexes and histograms. But there are so many options and types on indexes that it can get confusing. Histograms are fairly new to MySQL but they do not work for all types of data. This talk covers how indexes and histograms work and show you how to test just how effective they are so you can measure the performance of your queries.
Pi Day 2022 - from IoT to MySQL HeatWave Database ServiceFrederic Descamps
HeatWave is a massively parallel, high performance, in-memory query accelerator for Oracle MySQL Database Service that accelerates MySQL performance by orders of magnitude for analytics and mixed workloads. But how do you collect data from an Internet of Things Environment so you can use HeatWave to process it? In one hour you will see how data collected by a Raspberry PI or other Internet of Things device can be uploaded to the MySQL Database Service and then processed by HeatWave.
D'une simple instance MysQL à une haute-disponibilité multi-sites, voici ce que vous décrouvrirez dans cette présentation. Comment effectuer cette transition et quelles solutions conviennent les mieux aux évolutions des exigences commerciales (RPO, RTO). Récemment, MySQL a étendu les possibilités de déploiement aisé d'architecture avec des outils intégrés. Venez découvrir ces solution Open Source qui font partie de MySQL.
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...Frederic Descamps
Logical dumps are becoming popular again. MySQL Shell parallel dump & load utility changed to way to deal with logical dumps, certainly when using instances in the cloud. MySQL 8.0 released also an awesome physical snapshot feature with CLONE.
In this session, I will show how to use these two ways of saving your data and how to use the generated backup to perform point-in-time recovery like a rockstar with MySQL 8.0 in 2022 !
The document discusses the new features of MySQL 8.0. It covers improvements to SQL functionality with common table expressions, window functions, and JSON support. It also discusses performance enhancements including hash joins, faster I/O with the new InnoDB buffer, and group replication for high availability. New features improve security, validation, indexing and usability.
The document is a presentation in French on the new features of MySQL 8.0. It discusses improvements to SQL functionality with Common Table Expressions, Window Functions, and LATERAL queries. It also covers new JSON functions and indexing, improved performance, and new management features in areas like replication, security, and error logging. The presentation provides examples and emphasizes that MySQL now supports both transactional SQL and NoSQL operations on JSON data, combining the benefits of both approaches.
This document provides a summary of updates to MySQL between October 2021 and May 2021. It discusses three releases of MySQL 8.0 (versions 8.0.23, 8.0.24, and 8.0.25) and new features including invisible columns, asynchronous replication connection failover, improved load/dump functionality in MySQL Shell, and the new MySQL Database Service on Oracle Cloud Infrastructure with HeatWave for accelerated analytics.
The document discusses MySQL Shell and how it can help database administrators (DBAs) with common tasks like deploying architectures, preparing upgrades, dumping and loading data, and managing users. MySQL Shell provides tools like the Admin API for configuring MySQL clusters and replicasets, an upgrade checker utility to validate upgrades to MySQL 8.0, and parallel dump and load functionality to backup, migrate, and reset data.
This document summarizes Frédéric Descamps' journey to add a user to the router_rest_accounts table to authenticate with the MySQL Router REST API. After several failed attempts using generated or external passwords, he learns directly from the MySQL Router development team that the REST API supports using the default MySQL 8.0 authentication string or the modular_crypt_format for password hashes, allowing simple password insertion.
In this follow-up session on knowledge and prompt engineering, we will explore structured prompting, chain of thought prompting, iterative prompting, prompt optimization, emotional language prompts, and the inclusion of user signals and industry-specific data to enhance LLM performance.
Join EIS Founder & CEO Seth Earley and special guest Nick Usborne, Copywriter, Trainer, and Speaker, as they delve into these methodologies to improve AI-driven knowledge processes for employees and customers alike.
Transcript: Details of description part II: Describing images in practice - T...BookNet Canada
This presentation explores the practical application of image description techniques. Familiar guidelines will be demonstrated in practice, and descriptions will be developed “live”! If you have learned a lot about the theory of image description techniques but want to feel more confident putting them into practice, this is the presentation for you. There will be useful, actionable information for everyone, whether you are working with authors, colleagues, alone, or leveraging AI as a collaborator.
Link to presentation recording and slides: https://bnctechforum.ca/sessions/details-of-description-part-ii-describing-images-in-practice/
Presented by BookNet Canada on June 25, 2024, with support from the Department of Canadian Heritage.
Coordinate Systems in FME 101 - Webinar SlidesSafe Software
If you’ve ever had to analyze a map or GPS data, chances are you’ve encountered and even worked with coordinate systems. As historical data continually updates through GPS, understanding coordinate systems is increasingly crucial. However, not everyone knows why they exist or how to effectively use them for data-driven insights.
During this webinar, you’ll learn exactly what coordinate systems are and how you can use FME to maintain and transform your data’s coordinate systems in an easy-to-digest way, accurately representing the geographical space that it exists within. During this webinar, you will have the chance to:
- Enhance Your Understanding: Gain a clear overview of what coordinate systems are and their value
- Learn Practical Applications: Why we need datams and projections, plus units between coordinate systems
- Maximize with FME: Understand how FME handles coordinate systems, including a brief summary of the 3 main reprojectors
- Custom Coordinate Systems: Learn how to work with FME and coordinate systems beyond what is natively supported
- Look Ahead: Gain insights into where FME is headed with coordinate systems in the future
Don’t miss the opportunity to improve the value you receive from your coordinate system data, ultimately allowing you to streamline your data analysis and maximize your time. See you there!
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/07/intels-approach-to-operationalizing-ai-in-the-manufacturing-sector-a-presentation-from-intel/
Tara Thimmanaik, AI Systems and Solutions Architect at Intel, presents the “Intel’s Approach to Operationalizing AI in the Manufacturing Sector,” tutorial at the May 2024 Embedded Vision Summit.
AI at the edge is powering a revolution in industrial IoT, from real-time processing and analytics that drive greater efficiency and learning to predictive maintenance. Intel is focused on developing tools and assets to help domain experts operationalize AI-based solutions in their fields of expertise.
In this talk, Thimmanaik explains how Intel’s software platforms simplify labor-intensive data upload, labeling, training, model optimization and retraining tasks. She shows how domain experts can quickly build vision models for a wide range of processes—detecting defective parts on a production line, reducing downtime on the factory floor, automating inventory management and other digitization and automation projects. And she introduces Intel-provided edge computing assets that empower faster localized insights and decisions, improving labor productivity through easy-to-use AI tools that democratize AI.
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsMydbops
This presentation, delivered at the Postgres Bangalore (PGBLR) Meetup-2 on June 29th, 2024, dives deep into connection pooling for PostgreSQL databases. Aakash M, a PostgreSQL Tech Lead at Mydbops, explores the challenges of managing numerous connections and explains how connection pooling optimizes performance and resource utilization.
Key Takeaways:
* Understand why connection pooling is essential for high-traffic applications
* Explore various connection poolers available for PostgreSQL, including pgbouncer
* Learn the configuration options and functionalities of pgbouncer
* Discover best practices for monitoring and troubleshooting connection pooling setups
* Gain insights into real-world use cases and considerations for production environments
This presentation is ideal for:
* Database administrators (DBAs)
* Developers working with PostgreSQL
* DevOps engineers
* Anyone interested in optimizing PostgreSQL performance
Contact info@mydbops.com for PostgreSQL Managed, Consulting and Remote DBA Services
Blockchain technology is transforming industries and reshaping the way we conduct business, manage data, and secure transactions. Whether you're new to blockchain or looking to deepen your knowledge, our guidebook, "Blockchain for Dummies", is your ultimate resource.
Kief Morris rethinks the infrastructure code delivery lifecycle, advocating for a shift towards composable infrastructure systems. We should shift to designing around deployable components rather than code modules, use more useful levels of abstraction, and drive design and deployment from applications rather than bottom-up, monolithic architecture and delivery.
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfjackson110191
These fighter aircraft have uses outside of traditional combat situations. They are essential in defending India's territorial integrity, averting dangers, and delivering aid to those in need during natural calamities. Additionally, the IAF improves its interoperability and fortifies international military alliances by working together and conducting joint exercises with other air forces.
UiPath Community Day Kraków: Devs4Devs ConferenceUiPathCommunity
We are honored to launch and host this event for our UiPath Polish Community, with the help of our partners - Proservartner!
We certainly hope we have managed to spike your interest in the subjects to be presented and the incredible networking opportunities at hand, too!
Check out our proposed agenda below 👇👇
08:30 ☕ Welcome coffee (30')
09:00 Opening note/ Intro to UiPath Community (10')
Cristina Vidu, Global Manager, Marketing Community @UiPath
Dawid Kot, Digital Transformation Lead @Proservartner
09:10 Cloud migration - Proservartner & DOVISTA case study (30')
Marcin Drozdowski, Automation CoE Manager @DOVISTA
Pawel Kamiński, RPA developer @DOVISTA
Mikolaj Zielinski, UiPath MVP, Senior Solutions Engineer @Proservartner
09:40 From bottlenecks to breakthroughs: Citizen Development in action (25')
Pawel Poplawski, Director, Improvement and Automation @McCormick & Company
Michał Cieślak, Senior Manager, Automation Programs @McCormick & Company
10:05 Next-level bots: API integration in UiPath Studio (30')
Mikolaj Zielinski, UiPath MVP, Senior Solutions Engineer @Proservartner
10:35 ☕ Coffee Break (15')
10:50 Document Understanding with my RPA Companion (45')
Ewa Gruszka, Enterprise Sales Specialist, AI & ML @UiPath
11:35 Power up your Robots: GenAI and GPT in REFramework (45')
Krzysztof Karaszewski, Global RPA Product Manager
12:20 🍕 Lunch Break (1hr)
13:20 From Concept to Quality: UiPath Test Suite for AI-powered Knowledge Bots (30')
Kamil Miśko, UiPath MVP, Senior RPA Developer @Zurich Insurance
13:50 Communications Mining - focus on AI capabilities (30')
Thomasz Wierzbicki, Business Analyst @Office Samurai
14:20 Polish MVP panel: Insights on MVP award achievements and career profiling
Performance Budgets for the Real World by Tammy EvertsScyllaDB
Performance budgets have been around for more than ten years. Over those years, we’ve learned a lot about what works, what doesn’t, and what we need to improve. In this session, Tammy revisits old assumptions about performance budgets and offers some new best practices. Topics include:
• Understanding performance budgets vs. performance goals
• Aligning budgets with user experience
• Pros and cons of Core Web Vitals
• How to stay on top of your budgets to fight regressions
Details of description part II: Describing images in practice - Tech Forum 2024BookNet Canada
This presentation explores the practical application of image description techniques. Familiar guidelines will be demonstrated in practice, and descriptions will be developed “live”! If you have learned a lot about the theory of image description techniques but want to feel more confident putting them into practice, this is the presentation for you. There will be useful, actionable information for everyone, whether you are working with authors, colleagues, alone, or leveraging AI as a collaborator.
Link to presentation recording and transcript: https://bnctechforum.ca/sessions/details-of-description-part-ii-describing-images-in-practice/
Presented by BookNet Canada on June 25, 2024, with support from the Department of Canadian Heritage.
Implementations of Fused Deposition Modeling in real worldEmerging Tech
The presentation showcases the diverse real-world applications of Fused Deposition Modeling (FDM) across multiple industries:
1. **Manufacturing**: FDM is utilized in manufacturing for rapid prototyping, creating custom tools and fixtures, and producing functional end-use parts. Companies leverage its cost-effectiveness and flexibility to streamline production processes.
2. **Medical**: In the medical field, FDM is used to create patient-specific anatomical models, surgical guides, and prosthetics. Its ability to produce precise and biocompatible parts supports advancements in personalized healthcare solutions.
3. **Education**: FDM plays a crucial role in education by enabling students to learn about design and engineering through hands-on 3D printing projects. It promotes innovation and practical skill development in STEM disciplines.
4. **Science**: Researchers use FDM to prototype equipment for scientific experiments, build custom laboratory tools, and create models for visualization and testing purposes. It facilitates rapid iteration and customization in scientific endeavors.
5. **Automotive**: Automotive manufacturers employ FDM for prototyping vehicle components, tooling for assembly lines, and customized parts. It speeds up the design validation process and enhances efficiency in automotive engineering.
6. **Consumer Electronics**: FDM is utilized in consumer electronics for designing and prototyping product enclosures, casings, and internal components. It enables rapid iteration and customization to meet evolving consumer demands.
7. **Robotics**: Robotics engineers leverage FDM to prototype robot parts, create lightweight and durable components, and customize robot designs for specific applications. It supports innovation and optimization in robotic systems.
8. **Aerospace**: In aerospace, FDM is used to manufacture lightweight parts, complex geometries, and prototypes of aircraft components. It contributes to cost reduction, faster production cycles, and weight savings in aerospace engineering.
9. **Architecture**: Architects utilize FDM for creating detailed architectural models, prototypes of building components, and intricate designs. It aids in visualizing concepts, testing structural integrity, and communicating design ideas effectively.
Each industry example demonstrates how FDM enhances innovation, accelerates product development, and addresses specific challenges through advanced manufacturing capabilities.
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Chris Swan
Have you noticed the OpenSSF Scorecard badges on the official Dart and Flutter repos? It's Google's way of showing that they care about security. Practices such as pinning dependencies, branch protection, required reviews, continuous integration tests etc. are measured to provide a score and accompanying badge.
You can do the same for your projects, and this presentation will show you how, with an emphasis on the unique challenges that come up when working with Dart and Flutter.
The session will provide a walkthrough of the steps involved in securing a first repository, and then what it takes to repeat that process across an organization with multiple repos. It will also look at the ongoing maintenance involved once scorecards have been implemented, and how aspects of that maintenance can be better automated to minimize toil.
MYIR Product Brochure - A Global Provider of Embedded SOMs & SolutionsLinda Zhang
This brochure gives introduction of MYIR Electronics company and MYIR's products and services.
MYIR Electronics Limited (MYIR for short), established in 2011, is a global provider of embedded System-On-Modules (SOMs) and
comprehensive solutions based on various architectures such as ARM, FPGA, RISC-V, and AI. We cater to customers' needs for large-scale production, offering customized design, industry-specific application solutions, and one-stop OEM services.
MYIR, recognized as a national high-tech enterprise, is also listed among the "Specialized
and Special new" Enterprises in Shenzhen, China. Our core belief is that "Our success stems from our customers' success" and embraces the philosophy
of "Make Your Idea Real, then My Idea Realizing!"
3.
Safe Harbor Statement
The following is intended to outline our generalproduct direction. It isintended for
information purpose only, and may not be incorporated into any contract. It isnot a
commitment to deliver any material, code, or functionality, and should not be relied up in
making purchasing decisions. Thedevelopment, release and timing of any features or
functionality described for Oracle´s product remains at thesole discretion of Oracle.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
3 / 168
4. Who I am ?
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
4 / 168
8. Agenda
MySQLInnoDB Cluster & Group Replication concepts
Migration from Master-Slave to GR
How to monitor ?
Application interaction
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
8 / 168
18. the magic explained
Group Replication Concept
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
18 / 168
19. Group Replication: heart of MySQL InnoDB
Cluster
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
19 / 168
20. Group Replication: heart of MySQL InnoDB
Cluster
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
20 / 168
21. MySQL Group Replication
but what is it ?!?
GR is a plugin forMySQL, made byMySQLand packaged withMySQL
GR is an implementation of Replicated Database State Machine theory
GR allows to write on all Group Members (cluster nodes) simultaneously while
retaining consistency
GR implements conflict detection and resolution
GR allows automatic distributed recovery
Supported onallMySQLplatforms!!
Linux, Windows, Solaris, OSX,FreeBSD
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
21 / 168
22. MySQL Group Communication System (GCS)
MySQLXcom protocol
Replicated Database State Machine
Paxos based protocol (similarto Mencius)
Its task: Deliver messages accross thedistributed system:
Atomically
in Total Order
MySQLGroup Replication receives theOrdered 'tickets' from thisGCS subsystem.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
22 / 168
23. And for users ?
not longer necessary to handle server fail-over manually or with a complicated script
GR provides fault tolerance
GR enables update-everywhere setups
GR handles crashes, failures, re-connects automatically
Allows an easy setup of a highly available MySQLservice!
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
23 / 168
24. OK, but how does it work ?
it´s just ...
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
24 / 168
25. OK, but how does it work ?
it´s just ...
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
25 / 168
26. OK, but how does it work ?
it´s just ...
... no, in fact the writeset replication issynchronousand then certification and apply of
the changes are local to each nodes and happen asynchronous.
not that easy to understand... right ? As a picture isworth a 1000words, let´s illustrate
this...
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
26 / 168
39. MySQLGroup Replication (full transaction)
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
39 / 168
40. MySQLGroup Replication (full transaction)
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
40 / 168
41. MySQLGroup Replication (full transaction)
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
41 / 168
42. MySQLGroup Replication (full transaction)
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
42 / 168
43. MySQLGroup Replication (full transaction)
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
43 / 168
44. MySQLGroup Replication (full transaction)
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
44 / 168
45. MySQLGroup Replication (full transaction)
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
45 / 168
46. MySQLGroup Replication (full transaction)
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
46 / 168
47. MySQLGroup Replication (full transaction)
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
47 / 168
48. Group Replication : Total Order Delivery - GTID
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
48 / 168
49. Group Replication : Total Order Delivery - GTID
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
49 / 168
50. Group Replication : Total Order Delivery - GTID
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
50 / 168
51. Group Replication : Total Order Delivery - GTID
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
51 / 168
52. Group Replication : Total Order Delivery - GTID
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
52 / 168
53. Group Replication : Total Order Delivery - GTID
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
53 / 168
54. Group Replication : Total Order Delivery - GTID
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
54 / 168
55. Group Replication : Total Order Delivery - GTID
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
55 / 168
56. Group Replication : Total Order Delivery - GTID
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
56 / 168
57. Group Replication : Total Order Delivery - GTID
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
57 / 168
58. Group Replication : Total Order Delivery - GTID
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
58 / 168
59. Group Replication : Total Order Delivery - GTID
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
59 / 168
60. Group Replication : Total Order Delivery - GTID
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
60 / 168
61. Group Replication : Total Order Delivery - GTID
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
61 / 168
62. Group Replication : Total Order Delivery - GTID
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
62 / 168
63. Group Replication : Total Order Delivery - GTID
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
63 / 168
64. Group Replication : Total Order Delivery - GTID
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
64 / 168
65. Group Replication : Total Order Delivery - GTID
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
65 / 168
66. Group Replication : Total Order Delivery - GTID
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
66 / 168
67. Group Replication: return commit
Asynchronous Replication:
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
67 / 168
68. Group Replication: return from commit (2)
Semi-Sync Replication:
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
68 / 168
69. Group Replication: return from commit (3)
Group Replication:
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
69 / 168
70. Group Replication : Optimistic Locking
Group Replication uses optimistic locking
during a transaction,local (InnoDB) lockinghappens
optimistically assumesthere will be no conflicts across nodes
(no communication between nodes necessary)
cluster-wide conflict resolution happens only at COMMIT, duringcertification
Let´s first have a look at the traditional locking to compare.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
70 / 168
83. Optimistic Locking
The system returns error 149 ascertification failed:
ERROR 1180 (HY000): Got error 149 during COMMIT
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
83 / 168
84. Certification
Certification is the process that only needs to answer thefollowing unique question:
can the write (transaction) beapplied?
based on unapplied earlier transactions
such conflicts must come forother members/nodes
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
84 / 168
85. Certification (2)
certification is a deterministic operation
certification individually happens on every member/node
communication with other members isnot needed for certification
pass: enter in the apply queue
fail: drop the transaction
serialized by the total order in GCS/Xcom + GTID
first committer wins rule
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
85 / 168
86. Drawbacks of optimistic locking
having a first-committer-wins system means conflicts will more likely happen with:
large transactions
long running transactions
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
86 / 168
87. GTID
GTIDs are the same as those used by asynchronous replication.
mysql> SELECT * FROM performance_schema.replication_connection_statusG
************************** 1. row ***************************
CHANNEL_NAME: group_replication_applier
GROUP_NAME: afb80f36-2bff-11e6-84e0-0800277dd3bf
SOURCE_UUID: afb80f36-2bff-11e6-84e0-0800277dd3bf
THREAD_ID: NULL
SERVICE_STATE: ON
COUNT_RECEIVED_HEARTBEATS: 0
LAST_HEARTBEAT_TIMESTAMP: 0000-00-00 00:00:00
RECEIVED_TRANSACTION_SET: afb80f36-2bff-11e6-84e0-0800277dd3bf:1-57,
f037578b-46b1-11e6-8005-08002774c31b:1-48937
LAST_ERROR_NUMBER: 0
LAST_ERROR_MESSAGE:
LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:00
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
87 / 168
88. GTID
but transactions use the Group´s GTID
mysql> show master statusG
************************** 1. row ***************************
File: mysql4-bin.000001
Position: 1501
Binlog_Do_DB:
Binlog_Ignore_DB:
Executed_Gtid_Set: afb80f36-2bff-11e6-84e0-0800277dd3bf:1-57,
f037578b-46b1-11e6-8005-08002774c31b:1-48937
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
88 / 168
89. Requirements
exclusively works with InnoDBtables
every table must have a PK defined
only IPV4 is supported
a good network with low latency isimportant
maximum of 9 members per group
log-bin must be enabled and onlybinlog_format=ROW is supported
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
89 / 168
90. Requirements (2)
enable GTIDs
replication meta-data must bestored insystem tables
--master-info-repository=TABLE
--relay-log-info-repository=TABLE
writesets extraction must be enabled TODO: I need to check on 5.7.19 and 8.0.1
--transaction-write-set-extraction=XXHASH64
log-slave-updates must alsobe enabled
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
90 / 168
91. Limitations
binlog checksum is not supported
--binlog-checksum=NONE
savepointswere not supported before 5.7.19& 8.0.1
SERIALIZABLEis not supported as transaction isolation level
http://lefred.be/content/mysql-group-replication-limitations-savepoints/
http://lefred.be/content/mysql-group-replication-and-table-design/
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
91 / 168
92. Is my workload ready for Group Replication ?
As the writesets (transactions) are replicated to all available nodes on commit, and as
they are certified on every node, a very large writeset could increase theamount of
certification errors.
Additionally, changing the samerecord on all thenodes (hotspot) concurrently will also
cause problems.
And finally, the certification uses theprimarykey of thetables, a table without PK isalso
a problem.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
92 / 168
93. Is my workload ready for Group Replication ?
Therefore, when using Group Replication, we should pay attention to these points:
PK is mandatory (and a good one isbetter)
avoid large transactions
avoid hotspot
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
93 / 168
94. ready ?
Migration from Master-Slave to GR
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
94 / 168
95. The plan
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
95 / 168
96. 1) We install and
setupMySQLInnoDB
Clusteron one of the
new servers
The plan
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
96 / 168
97. 2) We restore a
backup
3) setup
asynchronous
replication on the new
server.
The plan
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
97 / 168
98. 4) We add a new
instance to our group
The plan
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
98 / 168
99. 5) We point the
application to one of
our new nodes.
6) We wait and check
that asynchronous
replication is caught
up
7) we stop those
asynchronous slaves
The plan
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
99 / 168
100. 8) We attach the
mysql2 slave to the
group
The plan
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
100 / 168
101. 9) Use MySQL Router
for directing traffic
The plan
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
101 / 168
102. LatestMySQL5.7is already installed on
mysql3.
Let´s take a backup onmysql1 usingmeb:
[mysql1 ~]# mysqlbackup
--host=127.0.0.1
--backup-dir=/tmp/backup
--user=root --password=X
backup-and-apply-log
LAB2: Prepare mysql3
Asynchronous slave
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
102 / 168
103. LAB2: Prepare mysql3 (2)
Asynchronous slave
Copy the backup frommysql1 to mysql3:
[mysql1 ~]# scp -r /tmp/backup mysql3:/tmp
And restore it:
[mysql3 ~]# mysqlbackup --backup-dir=/tmp/backup --force copy-back
[mysql3 ~]# rm /var/lib/mysql/mysql*-bin* # just some cleanup
[mysql3 ~]# chown -R mysql. /var/lib/mysql
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
103 / 168
104. LAB3: mysql3 as asynchronous slave (2)
Asynchronous slave
Configure /etc/my.cnf with the minimal requirements:
[mysqld]
...
server_id=3
enforce_gtid_consistency = on
gtid_mode = on
log_bin
log_slave_updates
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
104 / 168
105. LAB2: Prepare mysql3 (3)
Asynchronous slave
Let´s startMySQLonmysql3:
[mysql3 ~]# systemctl start mysqld
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
105 / 168
106. find the GTIDs purged
change MASTER
set the purged GTIDs
start replication
LAB3: mysql3 as asynchronous slave (1)
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
106 / 168
107. LAB3: mysql3 as asynchronous slave (2)
Find the latest purged GTIDs:
[mysql3 ~]# cat /tmp/backup/meta/backup_gtid_executed.sql
SET @@GLOBAL.GTID_PURGED='33351000-3fe8-11e7-80b3-08002718d305:1-1002';
Connect to mysql3 and setup replication:
mysql> CHANGE MASTER TO MASTER_HOST="mysql1",
MASTER_USER="repl_async", MASTER_PASSWORD='Xslave',
MASTER_AUTO_POSITION=1;
mysql> RESET MASTER;
mysql> SET global gtid_purged="VALUE FOUND PREVIOUSLY";
mysql> START SLAVE;
Check that you receive the application´s traffic
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
107 / 168
108. Administration made easy and more...
MySQL-Shell
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
108 / 168
109. MySQL Shell
TheMySQLShell is an interactive Javascript, Python, or SQLinterface supporting
development and administration for theMySQLServer and is acomponent of theMySQL
Server. You can use theMySQLShell to perform data queriesand updates aswell as
various administration operations.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
109 / 168
110. MySQL Shell (2)
TheMySQLShell provides:
Both Interactive and Batch operations
Document and Relational Models
CRUD Document and Relational APIs via scripting
Traditional Table, JSON, Tab Separated output results formats
MySQLStandard and X Protocols
and more...
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
110 / 168
111. LAB4: MySQL InnoDB Cluster
Create a single instance cluster
Time to use the newMySQLShell !
[mysql3 ~]# mysqlsh
Let´s verify if our server is ready to becomea member of a newcluster:
mysql-js> dba.checkInstanceCon guration('root@mysql3:3306')
Change the configuration !
mysql-js> dba.con gureLocalInstance()
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
111 / 168
112. LAB4: MySQL InnoDB Cluster (2)
Restart mysqld to use the new configuration:
[mysql3 ~]# systemctl restart mysqld
Create a single instance cluster
[mysql3 ~]# mysqlsh
mysql-js> dba.checkInstanceCon guration('root@mysql3:3306')
mysql-js> c root@mysql3:3306
mysql-js> cluster = dba.createCluster('MyInnoDBCluster')
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
112 / 168
113. LAB4: Cluster Status
mysql-js> cluster.status()
{
"clusterName": "MyInnoDBCluster",
"defaultReplicaSet": {
"name": "default",
"primary": "mysql3:3306",
"status": "OK_NO_TOLERANCE",
"statusText": "Cluster is NOT tolerant to any failures.",
"topology": {
"mysql3:3306": {
"address": "mysql3:3306",
"mode": "R/W",
"readReplicas": {},
"role": "HA",
"status": "ONLINE"
}
}
}
}
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
113 / 168
114. Addmysql4 to the Group:
restore the backup
set the purged GTIDs
useMySQLshell
LAB5: add mysql4 to the cluster (1)
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
114 / 168
115. LAB5: add mysql4 to the cluster (2)
Copy the backup frommysql1 to mysql4:
[mysql1 ~]# scp -r /tmp/backup mysql4:/tmp
And restore it:
[mysql4 ~]# mysqlbackup --backup-dir=/tmp/backup --force copy-back
[mysql4 ~]# rm /var/lib/mysql/mysql*-bin* # just some cleanup
[mysql4 ~]# chown -R mysql. /var/lib/mysql
StartMySQLonmysql4:
[mysql4 ~]# systemctl start mysqld
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
115 / 168
116. LAB5: MySQL shell to add an instance (3)
[mysql4 ~]# mysqlsh
Let´s verify the config:
mysql-js> dba.checkInstanceCon guration('root@mysql4:3306')
And change the configuration:
mysql-js> dba.con gureLocalInstance()
Restart the service to enablethechanges:
[mysql4 ~]# systemctl restart mysqld
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
116 / 168
117. LAB5: MySQL InnoDB Cluster (4)
Group of 2 instances
Find the latest purged GTIDs:
[mysql4 ~]# cat /tmp/backup/meta/backup_gtid_executed.sql
SET @@GLOBAL.GTID_PURGED='33351000-3fe8-11e7-80b3-08002718d305:1-1002';
...
Connect to mysql4 and set GTID_PURGED
[mysql4 ~]# mysqlsh
mysql-js> c root@mysql4:3306
mysql-js> sql
mysql-sql> RESET MASTER;
mysql-sql> SET global gtid_purged="VALUE FOUND PREVIOUSLY";
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
117 / 168
118. LAB5: MySQL InnoDB Cluster (5)
mysql-sql> js
mysql-js> dba.checkInstanceCon guration('root@mysql4:3306')
mysql-js> c root@mysql3:3306
mysql-js> cluster = dba.getCluster()
mysql-js> cluster.checkInstanceState('root@mysql4:3306')
mysql-js> cluster.addInstance("root@mysql4:3306")
mysql-js> cluster.status()
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
118 / 168
119. Cluster Status
mysql-js> cluster.status()
{
"clusterName": "MyInnoDBCluster",
"defaultReplicaSet": {
"status": "Cluster is NOT tolerant to any failures.",
"topology": {
"mysql3:3306": {
"address": "mysql3:3306",
"status": "ONLINE",
"role": "HA",
"mode": "R/W",
"leaves": {
"mysql4:3306": {
"address": "mysql4:3306",
"status": "RECOVERING",
"role": "HA",
"mode": "R/O",
"leaves": {}
}
}
}
}
}
}
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
119 / 168
120. Recovering progress
On standard MySQL, monitor thegroup_replication_recovery channel to see
the progress:
mysql> show slave status for channel 'group_replication_recovery'G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: mysql3
Master_User: mysql_innodb_cluster_rpl_user
...
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
...
Retrieved_Gtid_Set: 6e7d7848-860f-11e6-92e4-08002718d305:1-6,
7c1f0c2d-860d-11e6-9df7-08002718d305:1-15,
b346474c-8601-11e6-9b39-08002718d305:1964-77177,
e8c524df-860d-11e6-9df7-08002718d305:1-2
Executed_Gtid_Set: 7c1f0c2d-860d-11e6-9df7-08002718d305:1-7,
b346474c-8601-11e6-9b39-08002718d305:1-45408,
e8c524df-860d-11e6-9df7-08002718d305:1-2
...
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
120 / 168
121. point the application
to the cluster
Migrate the application
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
121 / 168
122. LAB6: Migrate the application
Now we need to point the application to mysql3, this is the only downtime !
...
[ 21257s] threads: 4, tps: 12.00, reads: 167.94, writes: 47.98, response time: 18
[ 21258s] threads: 4, tps: 6.00, reads: 83.96, writes: 23.99, response time: 14
[ 21259s] threads: 4, tps: 7.00, reads: 98.05, writes: 28.01, response time: 16
[ 31250s] threads: 4, tps: 8.00, reads: 111.95, writes: 31.99, response time: 30
[ 31251s] threads: 4, tps: 11.00, reads: 154.01, writes: 44.00, response time: 13
[ 31252s] threads: 4, tps: 11.00, reads: 153.94, writes: 43.98, response time: 12
[ 31253s] threads: 4, tps: 10.01, reads: 140.07, writes: 40.02, response time: 17
^C
[mysql1 ~]# run_app.sh mysql3
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
122 / 168
123. LAB6: Migrate the application
Stop asynchronous replicationon mysql2 andmysql3:
mysql2> stop slave;
mysql3> stop slave;
Make sure gtid_executed range onmysql2 is lower or equal than onmysql3
mysql[2-3]> show global variables like 'gtid_executed'G
mysql[2-3]> reset slave all;
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
123 / 168
124. previous slave
(mysql2) can now
be part of the cluster
Add a third instance
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
124 / 168
125. LAB7: Add mysql2 to the group
We first validate the instance using MySQLShell and we configure it.
[mysql2 ~]# mysqlsh
mysql-js> dba.checkInstanceCon guration('root@mysql2:3306')
mysql-js> dba.con gureLocalInstance()
We also need to remove super_read_onlyfrommy.cnf to be able to use the shell to add
the node to the cluster.
[mysql2 ~]# systemctl restart mysqld
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
125 / 168
126. LAB7: Add mysql2 to the group (2)
Back inMySQLshell we add the new instance:
[mysql2 ~]# mysqlsh
mysql-js> dba.checkInstanceCon guration('root@mysql2:3306')
mysql-js> c root@mysql3:3306
mysql-js> cluster = dba.getCluster()
mysql-js> cluster.addInstance("root@mysql2:3306")
mysql-js> cluster.status()
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
126 / 168
127. LAB7: Add mysql2 to the group (3)
{
"clusterName": "MyInnoDBCluster",
"defaultReplicaSet": {
"name": "default",
"primary": "mysql3:3306",
"status": "OK",
"statusText": "Cluster is ONLINE and can tolerate up to ONE failure.",
"topology": {
"mysql2:3306": {
"address": "mysql2:3306",
"mode": "R/O",
"readReplicas": {},
"role": "HA",
"status": "ONLINE"
},
"mysql3:3306": {
"address": "mysql3:3306",
"mode": "R/W",
"readReplicas": {},
"role": "HA",
"status": "ONLINE"
},
"mysql4:3306": {
"address": "mysql4:3306",
"mode": "R/O",
"readReplicas": {},Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
127 / 168
128. writing to a single server
Single Primary Mode
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
128 / 168
129. Default = Single Primary Mode
By default, MySQLInnoDBClusterenablesSingle Primary Mode.
mysql> show global variables like 'group_replication_single_primary_mode';
+---------------------------------------+-------+
| Variable_name | Value |
+---------------------------------------+-------+
| group_replication_single_primary_mode | ON |
+---------------------------------------+-------+
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
129 / 168
130. Default = Single Primary Mode
By default, MySQLInnoDBClusterenablesSingle Primary Mode.
mysql> show global variables like 'group_replication_single_primary_mode';
+---------------------------------------+-------+
| Variable_name | Value |
+---------------------------------------+-------+
| group_replication_single_primary_mode | ON |
+---------------------------------------+-------+
In Single Primary Mode, a single member acts asthewritable master (PRIMARY) and the
rest of the members act as hot-standbys (SECONDARY).
The group itself coordinates and configures itself automatically to determine which
member will act as thePRIMARY, through a leader election mechanism.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
130 / 168
131. Who´s the Primary Master ?
As the Primary Master is elected, all nodes partof thegroup knows which one was
elected. This value is exposed instatus variables:
mysql> show status like 'group_replication_primary_member';
+----------------------------------+--------------------------------------+
| Variable_name | Value |
+----------------------------------+--------------------------------------+
| group_replication_primary_member | 28a4e51f-860e-11e6-bdc4-08002718d305 |
+----------------------------------+--------------------------------------+
mysql> select member_host as "primary master"
from performance_schema.global_status
join performance_schema.replication_group_members
where variable_name = 'group_replication_primary_member'
and member_id=variable_value;
+---------------+
| primary master|
+---------------+
| mysql3 |
+---------------+
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
131 / 168
132. Create a Multi-Primary Cluster:
It´s also possible to create a Multi-PrimaryCluster using theShell:
mysql-js> cluster=dba.createCluster('perconalive',{multiMaster: true})
A new InnoDB cluster will be created on instance 'root@mysql3:3306'.
The MySQL InnoDB cluster is going to be setup in advanced Multi-Master Mode.
Before continuing you have to con rm that you understand the requirements and
limitations of Multi-Master Mode. Please read the manual before proceeding.
I have read the MySQL InnoDB cluster manual and I understand the requirements
and limitations of advanced Multi-Master Mode.
Con rm [y|N]:
Or you can force it to avoid interaction (for automation) :
js> cluster=dba.createCluster('perconalive',{multiMaster: true, force: true})
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
132 / 168
134. Performance Schema
Group Replication usesPerformance_Schema to expose status
mysql3> SELECT * FROM performance_schema.replication_group_membersG
*************************** 1. row ***************************
CHANNEL_NAME: group_replication_applier
MEMBER_ID: 00db47c7-3e23-11e6-afd4-08002774c31b
MEMBER_HOST: mysql3.localdomain
MEMBER_PORT: 3306
MEMBER_STATE: ONLINE
mysql3> SELECT * FROM performance_schema.replication_connection_statusG
*************************** 1. row ***************************
CHANNEL_NAME: group_replication_applier
GROUP_NAME: afb80f36-2bff-11e6-84e0-0800277dd3bf
SOURCE_UUID: afb80f36-2bff-11e6-84e0-0800277dd3bf
THREAD_ID: NULL
SERVICE_STATE: ON
COUNT_RECEIVED_HEARTBEATS: 0
LAST_HEARTBEAT_TIMESTAMP: 0000-00-00 00:00:00
RECEIVED_TRANSACTION_SET: afb80f36-2bff-11e6-84e0-0800277dd3bf:1-2
LAST_ERROR_NUMBER: 0
LAST_ERROR_MESSAGE:
LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:00
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
134 / 168
135. Member State
These are the different possible state for a node member:
ONLINE
OFFLINE
RECOVERING
ERROR: when a node is leaving but the plugin wasnot instructed to stop
UNREACHABLE
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
135 / 168
136. Status information & metrics
Members
mysql> SELECT * FROM performance_schema.replication_group_membersG
*************************** 1. row ***************************
CHANNEL_NAME: group_replication_applier
MEMBER_ID: 00db47c7-3e23-11e6-afd4-08002774c31b
MEMBER_HOST: mysql3.localdomain
MEMBER_PORT: 3306
MEMBER_STATE: ONLINE
*************************** 2. row ***************************
CHANNEL_NAME: group_replication_applier
MEMBER_ID: e1544c9d-4451-11e6-9f5a-08002774c31b
MEMBER_HOST: mysql4.localdomain.localdomain
MEMBER_PORT: 3306
MEMBER_STATE: ONLINE
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
136 / 168
137. Status information & metrics
Connections
mysql> SELECT * FROM performance_schema.replication_connection_statusG
*************************** 1. row ***************************
CHANNEL_NAME: group_replication_applier
GROUP_NAME: afb80f36-2bff-11e6-84e0-0800277dd3bf
SOURCE_UUID: afb80f36-2bff-11e6-84e0-0800277dd3bf
THREAD_ID: NULL
SERVICE_STATE: ON
COUNT_RECEIVED_HEARTBEATS: 0
LAST_HEARTBEAT_TIMESTAMP: 0000-00-00 00:00:00
RECEIVED_TRANSACTION_SET: 5de4400b-3dd7-11e6-8a71-08002774c31b:1-814089,
afb80f36-2bff-11e6-84e0-0800277dd3bf:1-2834
LAST_ERROR_NUMBER: 0
LAST_ERROR_MESSAGE:
LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:00
*************************** 2. row ***************************
CHANNEL_NAME: group_replication_recovery
GROUP_NAME:
SOURCE_UUID:
THREAD_ID: NULL
SERVICE_STATE: OFF
COUNT_RECEIVED_HEARTBEATS: 0Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
137 / 168
138. Status information & metrics
Local node status
mysql> select * from performance_schema.replication_group_member_statsG
*************************** 1. row ***************************
CHANNEL_NAME: group_replication_applier
VIEW_ID: 14679667214442885:4
MEMBER_ID: e1544c9d-4451-11e6-9f5a-08002774c31b
COUNT_TRANSACTIONS_IN_QUEUE: 0
COUNT_TRANSACTIONS_CHECKED: 5961
COUNT_CONFLICTS_DETECTED: 0
COUNT_TRANSACTIONS_ROWS_VALIDATING: 0
TRANSACTIONS_COMMITTED_ALL_MEMBERS: 5de4400b-3dd7-11e6-8a71-08002774c31b:1-814089
afb80f36-2bff-11e6-84e0-0800277dd3bf:1-5718
LAST_CONFLICT_FREE_TRANSACTION: afb80f36-2bff-11e6-84e0-0800277dd3bf:5718
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
138 / 168
139. Performance_Schema
You can find GR information in thefollowing Performance_Schematables:
replication_applier_con guration
replication_applier_status
replication_applier_status_by_worker
replication_connection_con guration
replication_connection_status
replication_group_member_stats
replication_group_members
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
139 / 168
140. Status during recovery
mysql> SHOW SLAVE STATUS FOR CHANNEL 'group_replication_recovery'G
*************************** 1. row ***************************
Slave_IO_State:
Master_Host: <NULL>
Master_User: gr_repl
Master_Port: 0
...
Relay_Log_File: mysql4-relay-bin-group_replication_recovery.000001
...
Slave_IO_Running: No
Slave_SQL_Running: No
...
Executed_Gtid_Set: 5de4400b-3dd7-11e6-8a71-08002774c31b:1-814089,
afb80f36-2bff-11e6-84e0-0800277dd3bf:1-5718
...
Channel_Name: group_replication_recovery
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
140 / 168
141. Sys Schema
The easiest way to detect if anode isa member of theprimarycomponent (when there
are partitioning of your nodes due to network issues for example) and therefore a valid
candidate for routing queriesto it, isto use thesys table.
Additional information forsys can be downloaded at
https://github.com/lefred/mysql_gr_routing_check/blob/master/addition_to_sys.sql
On the primary node:
[mysql? ~]# mysql < /tmp/addition_to_sys.sql
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
141 / 168
142. Sys Schema
Is this node part of PRIMARY Partition:
mysql3> SELECT sys.gr_member_in_primary_partition();
+------------------------------------+
| sys.gr_node_in_primary_partition() |
+------------------------------------+
| YES |
+------------------------------------+
To use as healthcheck:
mysql3> SELECT * FROM sys.gr_member_routing_candidate_status;
+------------------+-----------+---------------------+----------------------+
| viable_candidate | read_only | transactions_behind | transactions_to_cert |
+------------------+-----------+---------------------+----------------------+
| YES | YES | 0 | 0 |
+------------------+-----------+---------------------+----------------------+
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
142 / 168
143. LAB8: Sys Schema - Health Check
On one of the non Primary nodes, run thefollowing command:
mysql-sql> ush tables with read lock;
Now you can verify what the healthcheck exposes to you:
mysql-sql> SELECT * FROM sys.gr_member_routing_candidate_status;
+------------------+-----------+---------------------+----------------------+
| viable_candidate | read_only | transactions_behind | transactions_to_cert |
+------------------+-----------+---------------------+----------------------+
| YES | YES | 950 | 0 |
+------------------+-----------+---------------------+----------------------+
mysql-sql> UNLOCK TABLES;
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
143 / 168
145. MySQL Router
MySQLRouter is lightweight middleware that provides transparent routing between your
application and backendMySQLServers. It can be used for awide variety of use cases,
such as providing high availability and scalability by effectively routing database trafficto
appropriate backendMySQLServers.
MySQLRouter doesn´t require any specific configuration. Itconfigures itself automatically
(bootstrap) usingMySQLInnoDB Cluster´s metadata.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
145 / 168
146. LAB9: MySQL Router
We will now usemysqlrouter between our application and thecluster.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
146 / 168
147. LAB9: MySQL Router (2)
Configure MySQLRouter that will run on the app server (mysql1).We bootstrap it using
thePrimary-Master:
[root@mysql1 ~]# mysqlrouter --bootstrap mysql3:3306 --user mysqlrouter
Please enter MySQL password for root:
WARNING: The MySQL server does not have SSL con gured and metadata used by
the router may be transmitted unencrypted.
Bootstrapping system MySQL Router instance...
MySQL Router has now been con gured for the InnoDB cluster 'MyInnoDBCluster'.
The following connection information can be used to connect to the cluster.
Classic MySQL protocol connections to cluster 'MyInnoDBCluster':
- Read/Write Connections: localhost:6446
- Read/Only Connections: localhost:6447
X protocol connections to cluster 'MyInnoDBCluster':
- Read/Write Connections: localhost:64460
- Read/Only Connections: localhost:64470
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
147 / 168
148. LAB9: MySQL Router (3)
Now let´s modify the configuration file to listen on port 3306:
in/etc/mysqlrouter/mysqlrouter.conf:
[routing:MyInnoDBCluster_default_rw]
-bind_port=6446
+bind_port=3306
We can stopmysqld onmysql1 and startmysqlrouter into ascreensession:
[mysql1 ~]# systemctl stop mysqld
[mysql1 ~]# systemctl start mysqlrouter
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
148 / 168
149. LAB9: MySQL Router (4)
Before killing a member we will change systemd´s default behavior that restarts
mysqld immediately:
in/usr/lib/systemd/system/mysqld.service add the following under
[Service]
RestartSec=30
[mysql3 ~]# systemctl daemon-reload
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
149 / 168
150. LAB9: MySQL Router (5)
Now we can point the application to therouter (back to mysql1):
[mysql1 ~]# run_app.sh
Check app and killmysqld onmysql3(the Primary Master R/W node) !
[mysql3 ~]# kill -9 $(pidof mysqld)
mysql> select member_host as "primary" from performance_schema.global_status
join performance_schema.replication_group_members
where variable_name = 'group_replication_primary_member'
and member_id=variable_value;
+---------+
| primary |
+---------+
| mysql4 |
+---------+
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
150 / 168
151. ProxySQL / HA Proxy / F5 / ...
3rd party router/proxy
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
151 / 168
152. ProxySQLalso has native support for Group
Replication which makes it maybe thebest
choice for advanced users.
3rd party router/proxy
MySQLInnoDB Clustercan also work withthird party router / proxy.
If you need some specific features that are not yet available inMySQLRouter, like
transparent R/W splitting, then you canuse your software of choice.
The important part of such implementation isto use a good health check to verify if the
MySQLserver you plan to route the traffic isina valid state.
MySQLRouterimplements that natively, andit´s very easy to deploy.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
152 / 168
154. Recovering Nodes/Members
The old master (mysql3) got killed.
MySQLgot restarted automatically by systemd
Let´s addmysql3 back to the clsuter
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
154 / 168
155. LAB10: Recovering Nodes/Members
[mysql3 ~]# mysqlsh
mysql-js> c root@mysql4:3306 # The current master
mysql-js> cluster = dba.getCluster()
mysql-js> cluster.status()
mysql-js> cluster.rejoinInstance("root@mysql3:3306")
Rejoining the instance to the InnoDB cluster. Depending on the original
problem that made the instance unavailable, the rejoin operation might not be
successful and further manual steps will be needed to x the underlying
problem.
Please monitor the output of the rejoin operation and take necessary action if
the instance cannot rejoin.
Please provide the password for 'root@mysql3:3306':
Rejoining instance to the cluster ...
The instance 'root@mysql3:3306' was successfully rejoined on the cluster.
The instance 'mysql3:3306' was successfully added to the MySQL Cluster.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
155 / 168
156. mysql-js> cluster.status()
{ "clusterName": "MyInnoDBCluster",
"defaultReplicaSet": {
"name": "default",
"primary": "mysql4:3306",
"status": "OK",
"statusText": "Cluster is ONLINE and can tolerate up to ONE failure.",
"topology": {
"mysql2:3306": {
"address": "mysql2:3306",
"mode": "R/O",
"readReplicas": {},
"role": "HA",
"status": "ONLINE" },
"mysql3:3306": {
"address": "mysql3:3306",
"mode": "R/O",
"readReplicas": {},
"role": "HA",
"status": "ONLINE" },
"mysql4:3306": {
"address": "mysql4:3306",
"mode": "R/W",
"readReplicas": {},
"role": "HA",
"status": "ONLINE" }
}
}
}
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
156 / 168
157. Recovering Nodes/Members (automatically)
This time before killing a member of thegroup, we will persistthe configuration ondisk in
my.cnf.
We will use again the sameMySQLcommand as previously
dba.con gureLocalInstance() but this time when all nodes are already
part of the Group.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
157 / 168
158. LAB10: Recovering Nodes/Members (2)
Verify that all nodes are ONLINE.
...
mysql-js> cluster.status()
Then on all nodes run:
mysql-js> dba.con gureLocalInstance()
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
158 / 168
159. LAB10: Recovering Nodes/Members (3)
Kill one node again:
[mysql3 ~]# kill -9 $(pidof mysqld)
systemd will restartmysqld and verify if the node joined.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
159 / 168
161. Flow Control
When usingMySQLGroup Replication, it´s possible that somemembers are lagging behind
the group. Due to load, hardware limitation, etc... Thislagcan becomeproblematicto keep
good certification performance and keep the possible certification failures aslow as
possible.
More problems can occur in multi-primary/write clusters when theapplying queue grows,
the risk to have conflicts with those not yet applied transactions increases.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
161 / 168
162. Flow Control (2)
WithinMySQLGroup Replication´s FC implementation :
the Group is never totally stalled
the node having issues doesn´t send flow control messages to therest of thegroup
asking to slow down
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
162 / 168
163. Flow Control (3)
Every member of the Group send somestatistics about its queues (applier queue and
certification queue) to the other members.
Then every node decide to slow down or not if they realize that one node reached the
threshold for one of the queue:
group_replication_ ow_control_applier_threshold (default
is 25000)
group_replication_ ow_control_certi er_threshold
(default is 25000)
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
163 / 168
164. Flow Control (4)
So whengroup_replication_ ow_control_mode is set to QUOTA on the
node seeing that one of the other members of thecluster is lagging behind (threshold
reached), it will throttle the write operations to thetheminimumquota.
This quota is calculated basedon thenumber of transactions applied inthelast second,
and then it is reduced below that by subtracting the"over the quota"messages from the
last period.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
164 / 168
165. LAB10: Flow Control
During this last lab, we will reduce theflow control threshold on the Primary Master:
mysql> show global variables like '% ow%';
+----------------------------------------------------+-------+
| Variable_name | Value |
+----------------------------------------------------+-------+
| group_replication_ ow_control_applier_threshold | 25000 |
| group_replication_ ow_control_certi er_threshold | 25000 |
| group_replication_ ow_control_mode | QUOTA |
+----------------------------------------------------+-------+
3 rows in set (0.08 sec)
mysql> set global group_replication_ ow_control_applier_threshold=100;
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
165 / 168
166. LAB10: Flow Control (1)
And now we block all writes onone of theSecondary-Masters:
mysql> ush tables with read lock;
And we check how the queueis growing:
mysql> SELECT * FROM sys.gr_member_routing_candidate_status;
+------------------+-----------+---------------------+----------------------+
| viable_candidate | read_only | transactions_behind | transactions_to_cert |
+------------------+-----------+---------------------+----------------------+
| YES | NO | 487 | 0 |
+------------------+-----------+---------------------+----------------------+
Did you notice something on theapplication when thethreshold was reached ?
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
166 / 168
167. LAB10: Flow Control (2)
If nothing happened, please increase thetrx rate:
[root@mysql1 ~]# run_app.sh mysql1 --tx-rate=500
When the application's writesare low, you canjust remove thelock and see thequeue and
the effect on theapplication:
mysql> UNLOCK TABLES;
Create flow control again and when you see theapplication writing just a few
transactions, on the Primary-Master, disable theflow control mode:
mysql> set global group_replication_ ow_control_mode='DISABLED';
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
167 / 168
168. Thank you !
Any Questions ?
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
168 / 168