+ All Categories
Home > Documents > MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and...

MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and...

Date post: 26-May-2020
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
51
© 2018 Percona. 1 Peter Zaitsev, CEO, Percona MySQL: Scaling & High Availability Production experience for the last decade(s) June 19, 2018 Percona Technical Webinars
Transcript
Page 1: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 1

Peter Zaitsev, CEO, Percona

MySQL: Scaling & High AvailabilityProduction experience for the last decade(s)

June 19, 2018

Percona Technical Webinars

Page 2: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 2

Lets go to the start of my MySQL story

Going back almost 2 decades

Page 3: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 3

My S-Q-L: Wikipedia

MySQL (/ˌmaɪˌɛsˌkjuːˈɛl/ "My S-Q-L")[5]

Its name is a combination of "My", the name of co-founder Michael Widenius's daughter,[7] and "SQL", the abbreviation for Structured Query Language.

Page 4: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 4

July 1997 - MySQL Early Days

Page 5: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 5

1999

Page 6: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 6

My First MySQL Experience

Page 7: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 7

MySQL in 1999

MySQL 3.23 Alpha

MyISAM storage engine just introduced

Michael “Monty” Widenius personally reply to most MySQL issues

Page 8: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 8

MySQL Challenges in 1999

MyISAM Table Locks

Frequent Crashes (using Alpha software)

2GB File Size Limit on Linux

MyISAM Table Checks and Repairs take very long time

Page 9: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 9

MySQL “Tricks” in 1999

Sharding for Scalability

Single Node Sharding to avoid Table Locks

Building Lots of Summary Tables

Page 10: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 10

MySQL in 2000

Page 11: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 11

MySQL in 2001

MySQL 3.23 is “Stable”

MySQL 3.23-Max with Innodb (and BDB) Storage Engines

Initial release of MySQL Replication

MySQL is sued by Progress/Nusphere, Countersues

Page 12: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 12

2001-03-12: InnoDB and Transactions!

The MySQL Story,Page 75

Page 13: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 13

2001-07-15: lawsuit filed

On 15 June 2001, NuSphere sued MySQL AB, TcX DataKonsult AB and its original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference with third party contracts and relationships and unfair competition".[55][56]

Source: wikipedia

Page 14: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 14

… GPL lawsuit filed

In 2002, MySQL AB sued Progress NuSphere for copyright and trademark infringement in United States district court. NuSphere had allegedly violated MySQL's copyright by linking MySQL's GPL'ed code with NuSphere Gemini table without being in compliance with the license.[57] After a preliminary hearing before Judge Patti Saris on 27 February 2002, the parties entered settlement talks and eventually settled.[58] After the hearing, FSF commented that "Judge Saris made clear that she sees the GNU GPL to be an enforceable and binding license."[59]

Source: wikipedia

Page 15: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 15

Dual license modelGPL + Commercial

Page 16: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 16

MySQL Challenges in 2001

Stabilizing Innodb Making initial

release of MySQL Replication to

work

Page 17: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 17

2002

I Joined MySQL AB

Did a little bit of Development

Moved to do Support and Consulting

Manager “High Performance Group”

Page 18: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 18

MySQL Challenges in 2002

Scaling MySQL for Web 2.0

Query Optimization

MySQL Sharding is becoming common

bugs.mysql.com

Page 19: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 19

MySQL in 2003• MySQL 4.0 is released• Improved Replication• Query Cache

Page 20: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 20

LiveJournal “Reference Architecture”

Page 21: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 21

MySQL Tricks in 2003

MemcacheD

Massive Replication

Page 22: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 22

MySQL in 2004

MySQL 4.1 is available

First “Checkbox” Release

Subqueries and Prepared Statements

MySQL Cluster (NDB) is first available

Page 23: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 23

Blogging on MySQL

Page 24: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 24

MySQL in 2005

MySQL 5.0

Second “Checkbox” Release

Stored Procedures, Views, Triggers

Oracle Acquires Innobase (creator of Innodb)

First Puppet Release

Page 25: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 25

MySQL in 2006Scrambling with Innobase Acquisition fallout

Buys “Netfrastracture”

Jim Starkey (Firebird founder) Joins MySQL

“Falcon” Storage Engine

Hadoop is First Available

Page 26: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 26

2006 – Started MySQL Performance Blog

Page 27: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 27

• Performance Consultants• Helping Companies to Scale

MySQL

Started Percona with Vadim Tkachenko

Page 28: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 28

MySQL in 2008

MySQL 5.1 is released

Partitioning and Row Based Replication

Sun Microsystems Acquires MySQL AB

Amazon Web Services EC2 Available as GA

Page 29: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 29

• Helping Customers requires writing code

• Percona XtraDB (fork of Innodb)

• 2nd edition of High Performance MySQL Book

Percona in 2008

Page 30: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 30

MySQL in 2009

Oracle Acquires Sun and so MySQL

“Oracle will kill MySQL” rumors

MariaDB started by Michael “Monty” Widenius as MySQL Alternative

Amazon RDS MySQL is available

Initial version of MongoDB released

Page 31: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 31

MySQL in 2010

MySQL 5.5

Scalability, Performance Schema

OpenStack Initial Release

Page 32: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 32

Percona Server 5.1 Percona Xtrabackup

Percona in 2010

Page 33: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 33

MySQL Challenges 2010

Scaling MySQL with CPU Cores

MySQL Deployment Automation

Getting MySQL Ready for Cloud

Automated Replication Failover

Page 34: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 34

• Percona XtraDB Cluster 5.5 is Available

• New Generation, Cloud Friendly High Availability Technology for MySQL

2012

Page 35: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 35

MySQL in 2013

MySQL 5.6 is available

Better Scalability, Performance Schema, GTID, Optimizer

SSDs are mainstream

Initial release of Docker

Page 36: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 36

2014

Amazon RDS Aurora is available

Page 37: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 37

MySQL in 2015

MySQL 5.7 is available

Scalability, JSON, Document Store, Parallel, Multi Source Replication

ProxySQL is Available

Percona Acquires Tokutek (TokuDB)

Page 38: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 38

MySQL Challenges 2015

NoSQL Solutions, no need for Manual Sharding

Schema Changes are Painful

Many Developers do not understand or like SQL

MySQL Can’t use multiple CPU cores for a query

MySQL single thread performance tend to get worse for single queries

Page 39: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 39

Better Performance at Scale

Page 40: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 40

Sorry state of MySQL single thread performancehttp://bit.ly/2oMvu2a

Page 41: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 41

MySQL Ecosystem in 2016• Initial Release of Percona Monitoring and Management• ClickHouse Open Sourced by Yandex

Page 42: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 42

• MySQL Group Replication• MySQL Innodb Cluster

MySQL in 2017

Page 43: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 43

• MySQL 8.0.4 Release Candidate Available

• MyRocks available with Percona Server 5.7

MySQL 2018 (to date)

Page 44: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 44

MySQL in 2018

Is not the “only” Open Source Database Any More

Still #1 Open Source Relational Database

Used in Combination with Other Technologies in Data Architectures

Commonly Deployed in the Cloud

All major Cloud Providers have MySQL Compatible DBaaS

Page 45: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 45

Modern MySQL Scalability

Page 46: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 46

Single MySQL Instance Can Do

Hundreds of Thousands of Queries/Sec

Tends of Thousands of Updates/Sec

Traverse Tens of Millions of Rows/Sec

Comfortably Handle Several TB Database size

Page 47: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 47

Lets Do Some Math100.000 QPS

10 Queries per User Interaction

10.000 User Interactions/sec

864.000.000 User Interactions/Day

30 User Interactions/User Avg

28.000.000 Daily Active Users Possible

15M of Daily Active Users counting time of day skew

Page 48: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 48

MySQL Challenges in 2018Increasing Security and Compliance Requirements

Running MySQL in Containers

Easy to Use Scale-Out Solution

Self Tuning

Parallel Query Execution

GPL License

Oracle Reputation

Page 49: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 49

Page 50: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 50

Percona to Support PostgreSQL

Page 51: MySQL: Scaling & High Availability - Percona · original authors Michael ("Monty") Widenius and David Axmark in U.S District Court in Boston for "breach of contract, tortious interference

© 2018 Percona. 51

Thank You!


Recommended