2 Me, Myself & I MySQL Geek Addicted to MySQL for 15+ years Playing with databases for 20+ years MySQL Writer, Blogger and Speaker Also: DBA, Consultant, Architect, Trainer, ... MySQL Cloud Principal Solutions Architect EMEA at Oracle Stay up to date! Blog: www.dasini.net/blog/en Linkedin: www.linkedin.com/in/olivier-dasini/ Twitter: @freshdaz Olivier DASINI
its affiliates. All rights reserved. 5-Hour computer outage cost $150 million. The airline eventually canceled about 1,000 flights on the day of the outage and grounded an additional 1,000 flights over the following days. Millions of websites offline after fire at French cloud services firm. The fire is expected to cost the company more than €105 million. Tens of thousands of passengers were stranded in cities around the world due to cancellation of about 130 flights and the delay of 200. Millions of bank customers were unable to access online accounts. The bank took almost 2 days to recover and get back to normal functioning. 5
Oracle and/or its affiliates. All rights reserved. • When there is newly elected PRIMARY member in a cluster • Works on failures in PRIMARY and REPLICA clusters Automatic Handling of InnoDB Cluster state changes • Asynchronous replication is automatically reconfigured after primary change 38
Oracle and/or its affiliates. All rights reserved. • When there is newly elected PRIMARY member in a cluster • Works on failures in PRIMARY and REPLICA clusters Automatic Handling of InnoDB Cluster state changes • Asynchronous replication is automatically reconfigured after primary change 39
rights reserved. 42 Failover to another Cluster • One command to invalidate the PRIMARY cluster and promote a new PRIMARY cluster: forcePrimaryCluster() • Other REPLICA clusters replication will be recon Split Brain Warning • Local Routers that cannot connect to other clusters will not learn about new topology • If datacenter is network partitioned, it will continue to operate as PRIMARY
affiliates. All rights reserved. Failover to another Cluster • One command to invalidate the PRIMARY cluster and promote a new PRIMARY cluster: forcePrimaryCluster() • Other REPLICA clusters replication will be recon Split Brain Warning • Local Routers that cannot connect to other clusters will not learn about new topology • If datacenter is network partitioned, it will continue to operate as PRIMARY 43
its affiliates. All rights reserved. Router Integration • Routers will learn about new topology and redirect traffic • Routers that come back, will learn about new topology and abandon the old PRIMARY Cluster (e.g failed DC comes back online) 44
All rights reserved. 45 Router Integration When GR is offline: • Network partition • No quorum • Full cluster lost (e.g. power outage) Failover to another Cluster • One command to invalidate the PRIMARY cluster and promote a new PRIMARY cluster: forcePrimaryCluster() • Router instances will follow PRIMARY (depending on target mode)
Oracle and/or its affiliates. All rights reserved. Router Integration When GR is offline: • Network partition • No quorum • Full cluster lost (e.g. power outage) Failover to another Cluster • One command to invalidate the PRIMARY cluster and promote a new PRIMARY cluster: forcePrimaryCluster() • Router instances will follow PRIMARY (depending on target mode) 46
52 MySQL InnoDB ClusterSet Documentation https://dev.mysql.com/doc/mysql-shell/8.0/en/innodb-clusterset.html Tutoriel – Déployer MySQL 8.0 InnoDB Cluster http://dasini.net/blog/2019/09/03/tutoriel-deployer-mysql-8-0-innodb-cluster-09-2019/ MySQL InnoDB Cluster – Easy Recovering and provisioning http://dasini.net/blog/2019/09/10/mysql-innodb-cluster-easy-recovering-and-provisioning/ MySQL InnoDB Cluster – Recovering and provisioning with MySQL Enterprise Backup http://dasini.net/blog/2019/07/11/mysql-innodb-cluster-recovering-and-provisioning-with-mysql-enterprise-backup/ MySQL InnoDB Cluster Documentation https://dev.mysql.com/doc/refman/8.0/en/mysql-innodb-cluster-userguide.html MySQL Group Replication Documentation https://dev.mysql.com/doc/refman/8.0/en/group-replication.html MySQL InnoDB ReplicaSet https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-innodb-replicaset.html MySQL Router HA: Pacemaker https://lefred.be/content/mysql-router-ha-with-pacemaker/ MySQL Router HA: Keepalived https://lefred.be/content/mysql-router-ha-with-keepalived/ MySQL Router HA: DNS SRV https://www.slideshare.net/Grypyrg/mysql-connectors-8019-dns-srv MySQL Shell https://dev.mysql.com/doc/mysql-shell/8.0/en/ Resources – ClusterSet | Cluster | ReplicaSet | Router | Shell High Availability & Disaster Recovery solutions for MySQL